Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I generally like Gmail, but there's something about well formatted, color highlighted plain text over a black background that appeals to me a lot. I'd like to be able to use Emacs to read/send email using my Gmail account, but setting it up is infuriatingly difficult. I tried a bunch of extensions and tutorials, but none of them gave me a fully working email setup for Emacs.

This is going to be my last try before I give up. I'm on Ubuntu 11.10, standard Unity shell, using Emacs 23.3. Please tell me once and for all how to get this to work.

share|improve this question
add comment

3 Answers

up vote 2 down vote accepted

Gnus seems to have some instructions for GMail. Using IMAP is probably best since it leaves mail accessible with other clients and the web interface if something goes wrong locally.

share|improve this answer
add comment

I use offlineimap + dovecot for having the mails localy.

My .offlineimaprc is:

[general]
accounts = Locals, Gmail
maxsyncaccounts = 2

[Account Gmail]
localrepository = Local
remoterepository = Remote
autorefresh = 5

[Repository Local]
type = Maildir
localfolders = ~/Maildir

[Repository Remote]
type = Gmail
remotehost = imap.gmail.com
remoteuser = my.email@gmail.com

My /etc/dovecot.conf contain:

default_mail_env = maildir:%h/Maildir

and my .gnus have:

(setq imap-shell-program "/usr/lib/dovecot/imap")

(setq gnus-secondary-select-methods
      '((nndraft "")
        (nnimap "localhost"
         (nnimap-stream shell)))))

For outgoing mail I use:

(setq send-mail-function 'smtpmail-send-it)
(setq message-send-mail-function 'smtpmail-send-it)
(setq smtpmail-starttls-credentials '(("smtp.gmail.com" 587 nil nil)))
(setq smtpmail-auth-credentials '(("smtp.gmail.com" 587 "my.email@gmail.com" nil)))
(setq smtpmail-default-smtp-server "smtp.gmail.com")
(setq smtpmail-smtp-server "smtp.gmail.com")
(setq smtpmail-smtp-service 587)

And it just work.

share|improve this answer
    
I installed dovecot and it warned me that its "conf file does not belong to the current user". Not sure what to do with this. Also, I couldn't find the imap shell program. There's no imap file in /usr/lib/dovecot –  EpsilonVector Dec 8 '11 at 6:52
    
I don't know how you installed dovecot. I use Debian, and the dovecot package from debian unstable (package dovecot-imapd) –  Rémi Dec 8 '11 at 18:57
add comment

wl does the job too

Wanderlust http://www.gohome.org/wl/

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.