all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* gnus with multiple mail accounts
@ 2020-10-15 21:32 Jeremie Juste
  2020-10-16  1:12 ` Eric Abrahamsen
  2020-10-16  6:42 ` Pankaj Jangid
  0 siblings, 2 replies; 13+ messages in thread
From: Jeremie Juste @ 2020-10-15 21:32 UTC (permalink / raw)
  To: help-gnu-emacs

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


Best regards,
-- 
Jeremie Juste



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2020-10-18 17:35 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-15 21:32 gnus with multiple mail accounts Jeremie Juste
2020-10-16  1:12 ` Eric Abrahamsen
2020-10-16  7:24   ` Jeremie Juste
2020-10-16  8:50   ` Robert Pluim
2020-10-16 10:15     ` Robert Pluim
2020-10-16 10:38     ` Pankaj Jangid
2020-10-16 15:54     ` Eric S Fraga
2020-10-16 16:09       ` Robert Pluim
2020-10-16 20:19         ` Jeremie Juste
2020-10-17  6:30           ` Pankaj Jangid
2020-10-17 11:45         ` Eric S Fraga
2020-10-18 17:35           ` Robert Pluim
2020-10-16  6:42 ` Pankaj Jangid

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.