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

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

Re: How to add multiple email accounts inside gnus


From: Filipp Gunbin
Subject: Re: How to add multiple email accounts inside gnus
Date: Tue, 03 Nov 2015 22:32:19 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (darwin)

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 "address@hidden")
         ("X-Message-SMTP-Method" "smtp smtp.server1.com 587"))
        ("nnml:some-group"
         (address "address@hidden")
         ("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 "address@hidden" 
                           :stream tls)
                     (imap :server "imap.servers2.com" 
                           :user "address@hidden"
                           :stream tls)))

~/.authinfo:

machine imap.server1.com login address@hidden password secret1
machine imap.server2.com login address@hidden password secret2

Filipp



reply via email to

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