Gnus development mailing list
 help / color / mirror / Atom feed
From: Johnny <yggdrasil@gmx.co.uk>
To: ding@gnus.org
Subject: Multiple gmail accounts and SMTP (again)
Date: Sun, 24 Jul 2011 21:55:36 +0100	[thread overview]
Message-ID: <87r55fqtyv.fsf@DeuxExMachina.config> (raw)

I am attempting to set up a second gmail account, and have some trouble
in getting the outgoing mail to behave nicely. Summarising, I want to
send mail from either gmail-account with "From" address set
accordingly. Below, a ramble about my attempts so far.


In setting up the IMAP part, I defined the virtual server names and used
those in authinfo to successfully differentiate between the accounts:
In .gnus.el:
       (nnimap "gmail1"
	       (nnimap-address "imap.gmail.com")
	       (nnimap-server-port 993)
	       (nnimap-stream ssl)
	       (nnimap-list-pattern inbox-)
	       )
        (nnimap "gmail2"
	       (nnimap-address "imap.gmail.com")
	       (nnimap-server-port 993)
	       (nnimap-stream ssl)
	       (nnimap-list-pattern inbox-)
	       )

And then in .authinfo:
 machine gmail1 login gmail1@gmail.com password gmail1pass port 993
 machine gmail2 login gmail2@gmail.com password gmail2pass port 993

This makes the IMAP work well. All good so far. 

(For SMTP, I am using the emacs-wiki setup, as described here: http://www.emacswiki.org/emacs/MultipleSMTPAccounts)

I then attempted to use virtual server names for SMTP as well, i.e.:
In .gnus.el:
(setq smtp-accounts '(
                      (ssl "gmail1" "smtp.gmail.com" "587"
                            "gmail1@gmail.com" nil)
                      (ssl "gmail2" "smtp.gmail.com" "587"
                            "gmail2@gmail.com" nil)))

And in authinfo:
 machine gmail1 login gmail1@gmail.com password gmail1pass port 587
 machine gmail2 login gmail2@gmail.com password gmail2pass port 587

This breaks the sendmail/authinfo functionality such that I have to
enter credentials every time sending mail from either account.

If I instead replace the 2 lines above in authinfo with:
 machine smtp.gmail.com login gmail1@gmail.com password gmail1pass port 587

This makes mailing from both addresses work. I /think/ the setup makes
gmail2 use gmail1's SMTP credentials to send the mail (note that I
didn't have to do any changes in .gnus.el on the gmail2 credentials),
and indeed, when it is received, the posting-styles for gmail2 is used,
but the senders mail address has been changed to gmail1, which I do not
fancy at all.

Any ideas on how to enable using either gmail as sender?

Cheers
-- 
Johnny



             reply	other threads:[~2011-07-24 20:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-24 20:55 Johnny [this message]
2011-07-25 17:58 ` Sivaram Neelakantan
2011-07-25 20:23   ` Johnny
2011-08-21  4:14 ` Lars Magne Ingebrigtsen

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=87r55fqtyv.fsf@DeuxExMachina.config \
    --to=yggdrasil@gmx.co.uk \
    --cc=ding@gnus.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).