help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: gnus with multiple mail accounts


From: Eric Abrahamsen
Subject: Re: gnus with multiple mail accounts
Date: Thu, 15 Oct 2020 18:12:08 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Jeremie Juste <juste@inspiring-development.com> writes:

> Hello,
>
> I would like send mail from more than one mail account from gnus.
> I tried to use X-Message-SMTP-Method (info "(gnus) Posting Styles") 
> but I don't know how to change the smtpmail-stream-type.
>
>
> So I have come up with the following function. I only need to automate
> it to do the right assignment depending on which group I'm in. Do you
> have any lead please?
>
> (defun set-smtp (arg)
>   "switch mail server"
>   (interactive "p")
>   (if (eq arg 1)
>       (setq message-send-mail-function 'smtpmail-send-it
>           smtpmail-default-smtp-server "smtp.office365.com"
>           smtpmail-smtp-server "smtp.office365.com"
>           user-mail-address "<mail1.com>"
>           smtpmail-smtp-service 587
>           smtpmail-stream-type 'starttls
>           )
>     (setq message-send-mail-function 'smtpmail-send-it
>         smtpmail-default-smtp-server "smtp.gmail.com"
>         smtpmail-smtp-server "smtp.gmail.com"
>         user-mail-address "<mail2.gmail.com>"
>         smtpmail-smtp-service 465
>         smtpmail-stream-type 'ssl
>         )
>     ))

Are you sure it doesn't work just to set host and port in the
pseudo-header? Looking at the code, it ought to be setting
`smtpmail-stream-type' correctly from the port. I assume you've tried
that and it didn't work?




reply via email to

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