info-gnus-english
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how can I toggle smtp auth files


From: bsquared
Subject: Re: how can I toggle smtp auth files
Date: Sun, 18 Sep 2011 13:26:23 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)

Rasmus <rasmus@gmx.us> writes:


>
> 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.
>

Same machine (smtp.gmail.com), different accounts.

> Happy hacking.
>
> –Rasmus
>
>
> Footnotes: 
> ¹  http://www.emacswiki.org/emacs-en/GnusAuthinfo

Thanks, This should get me started.

-- 
Regards,
Brian Winfrey




reply via email to

[Prev in Thread] Current Thread [Next in Thread]