all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jeremie Juste <juste@inspiring-development.com>
To: help-gnu-emacs@gnu.org
Subject: gnus with multiple mail accounts
Date: Thu, 15 Oct 2020 23:32:13 +0200	[thread overview]
Message-ID: <87tuuvdvky.fsf@freegnu.i-did-not-set--mail-host-address--so-tickle-me> (raw)

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



             reply	other threads:[~2020-10-15 21:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-15 21:32 Jeremie Juste [this message]
2020-10-16  1:12 ` gnus with multiple mail accounts 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tuuvdvky.fsf@freegnu.i-did-not-set--mail-host-address--so-tickle-me \
    --to=juste@inspiring-development.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.