i think it is fun to have emacs act as your mail client. its like when u are busy writing code, and you got to send in some snippets or a quick mail on the issue, you just don’t leave the editor!. so here is how you integrate emacs to access your gmail compose. Note, your mails sent from emacs are also stores in the “sent” label on your gmail!
- emacs 23.2
Use the latest version of emacs, I used emacs23.2 while i made the customization.
download emacs from http://ftp.gnu.org/gnu/emacs/
gnutls is the gnu transport layer security library which ensures secure client/server communication over the transport layer.
http://www.gnu.org/software/gnutls/gnutls.html for more info on gnutls
To build gnutls, this package may be required it is provided in the gnutls download link along with gnu tls. One might have to download it separately.
The .authifo File
- The authinfo file stores the login information for the mail account. Create the .authinfo file
- Insert the following line into the .authinfo file which u can create and place in the ~/. directory
machine smtp.gmail.com login @gmail.com password
- Modify the permissions of the .authinfo file as follows
chmod go-rwx .authinfo
chmod u+rw .authinfo
Emacs Init Config (.emacs)
Add this section to your .emacs
;; email setting for my emac
(setq send-mail-function ‘smtpmail-send-it
‘((“smtp.gmail.com” 587 nil nil))
The keybinding for emacs to send mail is
- C-x m to compose mail
- C-c C-c to send mail when you are done composing the mails