Gnus development mailing list
 help / color / mirror / Atom feed
From: mihkel <turakas@gmail.com>
To: ding@gnus.org
Subject: Re: Can't send message through smtp with gmail
Date: Thu, 28 Jun 2012 23:45:33 +0300	[thread overview]
Message-ID: <87395f88sy.fsf@gigabyte.lan> (raw)
In-Reply-To: <hwipeb9vxv.fsf@news.eternal-september.org> (Richard Riley's message of "Thu, 28 Jun 2012 19:40:28 +0200")

[-- Attachment #1: Type: text/plain, Size: 1736 bytes --]

Richard Riley <rileyrg@gmail.com> writes:
>
> my advice would be to use nognus and the built in multi smtp support.
>
> in your .authinfo:
>
> something like:
>
> machine smtp.gmail.com login accid1 port 587 password password1
> machine smtp.gmail.com login accid2 port 587 password password2
>
> In your gnus posting styles for the group in question:-
>
> 			     (X-Message-SMTP-Method "smtp smtp.gmail.com 587 acc1")
>
> Its there somewhere in the gnus manual. But googling for
> x-message-smtp-method will show a previous thread on this.
>
> regards
>
> r.


Hi.

I took your advice and it works great. Thanks!

Now my gnus init file look alot cleaner. I was able to discard 
(defvar smtp-accounts ...)
(defadvice smtpmail-via-smtp ... )
(defun change-smtp () ... )

Just for those who tackle with the same problem. My updated
gnus-posting-style looks like this:

;; Let Gnus change the "From:" line by looking at current group we are
;; in.
(setq gnus-posting-styles
      '(("account1"
	  (address "account1@gmail.com")
	  (name "myname")
	  (X-Message-SMTP-Method "smtp smtp.gmail.com 587 account1@gmail.com"))
	 ("account2"
	  (address "account2@gmail.com")
	  (name "myname")
	  (X-Message-SMTP-Method "smtp smtp.gmail.com 587 account2@gmail.com")) 
	 ("account3"
	  (address "account3@gmail.com")
	  (name "myname")
	  (X-Message-SMTP-Method "smtp smtp.gmail.com 587 account3@gmail.com"))
	 ("account4"
	  (address "account4@gmail.com")
	  (name "myname")
	  (X-Message-SMTP-Method "smtp smtp.gmail.com 587 chino.toru@gmail.com"))
	 ("account5" (address "account5@hot.ee")
	  (name "myname")
	  (X-Message-SMTP-Method "smtp mail.hot.ee 25 account5"))
	 ))


mihkel

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

  reply	other threads:[~2012-06-28 20:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-27 10:25 mihkel
2012-06-27 22:28 ` Katsumi Yamaoka
2012-06-28 15:03   ` mihkel
2012-06-28 17:40     ` Richard Riley
2012-06-28 20:45       ` mihkel [this message]
2012-06-28 23:47         ` Richard Riley
2012-06-29  6:46           ` mihkel
2012-06-29  9:29             ` Richard Riley

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=87395f88sy.fsf@gigabyte.lan \
    --to=turakas@gmail.com \
    --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).