[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to add arguments in variable "sendmail-program"
From: |
ssSslang |
Subject: |
Re: How to add arguments in variable "sendmail-program" |
Date: |
Thu, 16 Nov 2006 11:33:47 +0800 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/23.0.0 (windows-nt) |
Shanks N <shanks.n@gmail.com> 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 "sssslang@home"))
(defun sssslang-use-office-smtp-server ()
(setq message-sendmail-extra-arguments '("-a" "office"))
(setq user-full-name "sssslang")
(setq user-mail-address "sssslang@office"))
(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