Hello list, I am using Gnus v5.13 bundled with emacs-snapshot on Ubuntu. I use fetchmail to download all my email and gnus to read it from ~/Mail
I found a snippet on the internet that helped me use gmail's smtp server It uses the msmtp program. ,---- | (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 "[EMAIL PROTECTED]" from) | (setq sendmail-program "msmtp")) | (add-hook 'message-setup-hook 'fs-change-smtp)))))) `---- and then in my ~/.msmtprc ,---- | account default | host smtp.gmail.com | auth on | user [EMAIL PROTECTED] | password PASSWORD | port 587 | tls on | logfile ~/.msmtplog `---- Now my job has set up an absolutely awful web based email system we all have to use. However I found out that I can use pop3 and smtp which means I can read and reply to work email in Gnus, fetchmail handles the pop3 part with ease but I am having trouble adding a second smtp server. I tried this in my .gnus.el ,---- | (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 "[EMAIL PROTECTED]" from) | (setq sendmail-program "msmtp")) | (add-hook 'message-setup-hook 'fs-change-smtp)) | (cond | ((string-match "[EMAIL PROTECTED]" from) | (setq sendmail-program "msmtp")) | (add-hook 'message-setup-hook 'fs-change-smtp)))))) `---- and then in my .msmtprc ,---- | account default | host smtp.gmail.com | auth on | user [EMAIL PROTECTED] | password PASSWORD | port 587 | tls on | logfile ~/.msmtplog | | account northwind | host smtp.northwindsolutions.com | from [EMAIL PROTECTED] | auth on | user [EMAIL PROTECTED] | password PASSWORD | tls on | port 5050 | logfile ~/.msmtplog `---- I get no error messages, but I have no elisp skills to speak of so I am not sure what I am doing wrong, anytime I reply to an email sent to my northwind account, the From: header is not changed Hopefully someone can help me? Is there a simpler way to do this btw? I wonder if gnus can use multiple smtp servers directly without having to use msmtp at all? Thank you in advance for any iput! -- Peter. _______________________________________________ info-gnus-english mailing list [email protected] http://lists.gnu.org/mailman/listinfo/info-gnus-english
