all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Filipp Gunbin <fgunbin@fastmail.fm>
To: Zed <hezhe310@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: How to add multiple email accounts inside gnus
Date: Tue, 03 Nov 2015 22:32:19 +0300	[thread overview]
Message-ID: <m28u6elvzw.fsf@fastmail.fm> (raw)
In-Reply-To: <8737wnorpb.fsf@gmail.com> (Zed's message of "Tue, 03 Nov 2015 11:36:48 -0700")

Hi,

On 03/11/2015 11:36 -0700, Zed wrote:

> I have set up the gnus with one gmail account (as follows)
>
> (setq gnus-select-method
>       '(nnimap "gmail"
> 	       (nnimap-address "imap.gmail.com")  ; it could also be imap.googlemail.com if that's your server.
> 	       (nnimap-server-port 993)
> 	       (nnimap-stream ssl)))
>
> (setq smtpmail-default-smtp-server "smtp.gmail.com")
> (setq smtpmail-smtp-server "smtp.gmail.com")
> (setq smtpmail-smtp-service 587) 
> (setq sendmail-program "C:/cygwin64/usr/sbin/msmtp")
>
> (setq message-send-mail-function 'message-send-mail-with-sendmail)
> (setq message-sendmail-extra-arguments '("-a" "gmail"))
>
>
> but is it possible to add other accounts such as hotmail as well? Also,
> I am not sure how to attach different accounts for different newsgroup?
>
> I googled the question for quite a well, but by adding address of
> gnus-posting-styles  only changes the signature but not the email
> adress?
>
> Thanks!

Sending mail:

(setq message-send-mail-function 'message-smtpmail-send-it)

(setq gnus-posting-styles
      '((".*"
	 (address "me@server1.com")
	 ("X-Message-SMTP-Method" "smtp smtp.server1.com 587"))
	("nnml:some-group"
	 (address "me@server2.com")
	 ("X-Message-SMTP-Method" "smtp smtp.server2.com 587"))))

This will add correct (internal) header when replying automatically, but
to use this when composing new message you have to go to the appropriate
group's line in Group buffer and type `C-u m' - this way this group's
posting style will be used.

For receiving my setup is a bit unusual - I download all email from imap
server.

(setq gnus-select-method '(nnnil ""))
(setq gnus-secondary-select-methods '((nnml "")))

(setq mail-sources '((imap :server "imap.server1.com"
			   :user "me@server1.com" 
			   :stream tls)
		     (imap :server "imap.servers2.com" 
		     	   :user "me@server2.com"
		     	   :stream tls)))

~/.authinfo:

machine imap.server1.com login me@server1.com password secret1
machine imap.server2.com login me@server2.com password secret2

Filipp



      parent reply	other threads:[~2015-11-03 19:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-03 18:36 How to add multiple email accounts inside gnus Zed
2015-11-03 19:28 ` Jorge A. Alfaro-Murillo
2015-11-03 19:32 ` Filipp Gunbin [this message]

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=m28u6elvzw.fsf@fastmail.fm \
    --to=fgunbin@fastmail.fm \
    --cc=help-gnu-emacs@gnu.org \
    --cc=hezhe310@gmail.com \
    /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.