Shanks N <[EMAIL PROTECTED]> writes:

>
> I too use msmtp.  Can you please post the relevant parts of msmtprc
> and .gnus file?  I too use multiple accounts to send and would be
> interested in knowing how to do it.
>

I don't wanna talk much about msmtp, and you could find it in its
manpage. :)

First, you must apply the patch to message.el supplied by kind Reiner.

Then, I assume you have two accounts in ~/.msmtprc file, "home" and
"office". You may try to add the following to ~/.gnus:

--8<---------------cut here---------------start------------->8---
(setq sendmail-program "/usr/bin/msmtp")

(defun sssslang-use-home-smtp-server ()
  (setq message-sendmail-extra-arguments '("-a" "home"))
  (setq user-full-name "sssslang")
  (setq user-mail-address "[EMAIL PROTECTED]"))

(defun sssslang-use-office-smtp-server ()
  (setq message-sendmail-extra-arguments '("-a" "office"))
  (setq user-full-name "sssslang")
  (setq user-mail-address "[EMAIL PROTECTED]"))

(setq gnus-posting-styles
      '(("mail\\.home"
         (name "sssslang")
         (signature "I'm at home.")
         (eval (sssslang-use-home-smtp-server)))
        ("mail\\.office"
         (name "sssslang")
         (signature "I'm at office.")
         (eval (sssslang-use-office-smtp-server)))))

--8<---------------cut here---------------end--------------->8---

That's all. If I missed something or there's another better way, please
let me know, thanks.

-- 
ssSslang
_______________________________________________
info-gnus-english mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/info-gnus-english

Reply via email to