Re: reading email from gmail account with gnus in Emacs22
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 11/04/07 07:11, Peter Smerdon wrote:
> Alexandru Cardaniuc <cardaniuc@gmail.com> writes:
>
>> Hi All!
>>
>> Does anybody here use gnus from Emacs22 to read mail from gmail account?
>> I managed to make it work with Emacs21. Recently I tried Emacs22 and my
>> old config from Emacs21 doesn't work. I get some errors when fetching
>> from gmail with pop.
>>
>> Did anybody here manage to make gnus in Emacs22 work with gmail? Any
>> hints on the configuration of .gnus ?
>>
>> That's the setup that works fine for Emacs21 but doesn't work for
>> Emacs22:
>>
>>
>> -------------------------------------------
>>
>> (setq user-full-name "Alexandru Cardaniuc")
>> (setq user-mail-address "whatever@gmail.com")
>>
>> ;; using GNUS to send mail
>> (setq message-send-mail-function 'smtpmail-send-it)
>>
>> (setq send-mail-function 'smtpmail-send-it)
>>
>> ;; use 'one file per mail' back end
>> (setq gnus-select-method '(nnml ""))
>> (setq gnus-secondary-select-methods nil)
>>
>> ;; tell Gnus how to fetch mail
>> (setq mail-sources '((file :path "/var/spool/mail/alexandru")
>> (pop :server "pop.gmail.com"
>> :port 995
>> :user "whatever@gmail.com"
>> :connection ssl
>> :password "secret"
>> :leave t))) ; leave the mail on the server
>>
>> (load-library "smtpmail")
>> (load-library "pop3")
>> (load-library "starttls")
>>
>> ;(setq pop3-debug t)
>>
>> (setq smtpmail-local-domain nil)
>>
>> ;(setq smtpmail-debug-info t) ; only to debug problems
>>
>> (setq smtpmail-auth-credentials '(("smtp.gmail.com" 25 "whatever@gmail.com" "secret")))
>> (setq smtpmail-starttls-credentials '(("smtp.gmail.com" 25 nil nil)))
>> (setq smtpmail-smtp-service "25")
>>
>
> Hello Alexandru,
> I use a different set up...
> I use fetchmail to pull down my gmail into my system's mail spool and
> then gnus reads it from there, when I reply, gnus has to send it through
> the gmail server and adjust the From: header.
>
>
> (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 "psmerdon@gmail.com" from)
> (setq sendmail-program "msmtp"))
> (add-hook 'message-setup-hook 'fs-change-smtp))))))
>
> You would have to of course install the program msmtp and create a
> ~/.msmtprc file:
>
> account default
> host smtp.gmail.com
> auth on
> user psmerdon@gmail.com
> password MYPASSWORD
> port 587
> tls on
> logfile ~/.msmtplog
Configuring your MTA as a relay host would do the same thing without
the need for a custom lisp routine.
> Not sure if you want to go that route though. You might also try the
> gnu.emacs.gnus newsgroup where you would definately get a better answer.
>
- --
Ron Johnson, Jr.
Jefferson LA USA
Give a man a fish, and he eats for a day.
Hit him with a fish, and he goes away for good!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFHLczpS9HxQb37XmcRAlAuAKDo5pa3wkW73S95d/fsud/Wk36kkACfWknm
O74m7Vg5+Egrm/8Frig8tF0=
=pFBp
-----END PGP SIGNATURE-----
Reply to: