bsquared <[email protected]> writes:

> Thanks for the reply.
>
> I saw that wiki page, and I thought there must be a simpler way;
> however, I think that the method of using a message header was
> interesting.

OK.

> If I reply to an email from account 1 then I want to use '~/authinfo.1',
> and likeways for account 2 and '~/authinfo.2'.

Anyhow, you write a simple function that checks the From field. 
Use something like (not tested and not complete):


#+begin_src emacs-lisp
(defun ()
"docstring"
  (if (equal (message-sendmail-envelope-from) "mail1")
      (setq smtpmail-auth-credentials "authinfo1")
      (setq smtpmail-auth-credentials "authinfo2")
)
;; Check out eldoc to get help on Emacs Lisp
#+end_src

This¹ page mentions several variables that may be of interest.

Then, you'd want to add this function to a hook, which is run before the
mail is delivered to the SMTP server.  Probably message-send-hook,
something like 
#+begin_src emacs-lisp
(add-hook 'message-send-hook 'my-fun)
#+end_src

However, I hardly grasp why you'd want to change this.  An authinfo
files may hold several machines.  Mine holds 13.

Happy hacking.

–Rasmus


Footnotes: 
¹  http://www.emacswiki.org/emacs-en/GnusAuthinfo

-- 
Sent from my Emacs


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

Reply via email to