[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Configuring gnus for gmail
From: |
Rodolfo Medina |
Subject: |
Re: Configuring gnus for gmail |
Date: |
6 Feb 2006 09:25:59 -0800 |
User-agent: |
G2/0.2 |
In order to fetch and send mail with gnus and gmail,
I've been following the steps described at:
http://www.pvv.ntnu.no/~terjeros/wiki/GnusGmail
, but gnus sticks down after asking for my gmail password.
I did everything (I hope) as described at that site:
I downloaded emacs cvs (see 'http://savannah.gnu.org/cvs/?group=emacs')
and installed it into my system: emacs 22.0.50.2 including gnus 5.11;
from
ftp://ftp.gnupg.org/gcrypt/libgpg-error
I downloaded libgpg-error-1.1.tar.gz and installed it;
from
ftp://ftp.gnupg.org/gcrypt/libgcrypt/
I downloaded libgcrypt-1.2.2.tar.gz and installed it;
from
http://www.gnu.org/software/gnutls/
I downloaded gnutls-1.2.9.tar.bz2 and installed it;
from
http://cvs.m17n.org/viewcvs/*checkout*/root/gnus/lisp/pop3.el?only_with_tag=t-gnus-6_17-quimby&rev=1.6.30.21.4.16
I fetched the file pop3.el and put it in my system at
'usr/local/share/emacs/22.0.50/lisp/gnus';
I created ~/.gnus.el and filled it with:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; The following line is needed when using pop3.el from T-gnus
(m17n.org).
(eval-after-load "mail-source" '(require 'pop3))
(setq gnus-select-method '(nnml ""))
(setq gnus-posting-styles
'((".*"
(name "Rodolfo Medina")
(address "rodolfo.medina@libero.it"))
("^nnml.*gmail"
(address "rodolfo.medina@gmail.com"))))
(setq mail-sources
'((file :path "/var/spool/mail/rodolfo.medina")
(pop :server "pop.gmail.com"
:port 995
:user "rodolfo.medina"
:connection ssl
:leave t)))
(defun fs-change-smtp ()
"Change the SMTP server according to the current from line."
(save-excursion
(let ((from
(save-restriction
(message-narrow-to-headers)
(message-fetch-field "from"))))
(message "From is `%s', setting `smtpmail-smtp-server' to `%s'"
from
(cond
((string-match "rodolfo.medina@gmail.com" from)
;; Use stmp-auth
(message "Using smtp-auth")
;; Sending mail
(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 "rodolfo.medina" nil)))
(setq smtpmail-default-smtp-server "smtp.gmail.com")
(setq smtpmail-smtp-server "smtp.gmail.com")
(setq smtpmail-smtp-service 587))
((string-match "rodolfo.medina@libero.it" from)
;; Use local sendmail
(message "Using local sendmail")
(setq message-send-mail-function
`message-send-mail-with-sendmail))
(t
(error
(concat "Don't know which mail server to use for "
from))))))))
(add-hook 'message-setup-hook 'fs-change-smtp)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
. Does anybody have any suggestion about what should the failure be?
Thanks in advance,
Rodolfo