From: Tom Roche <Tom_Roche@pobox.com>
To: help-gnu-emacs@gnu.org
Subject: [22] problem configuring smtpmail for gmail.com
Date: Sat, 18 Jul 2009 00:46:22 -0400 (EDT) [thread overview]
Message-ID: <20090718044623.01C6A14084B3B@cedar.isis.unc.edu> (raw)
I'd appreciate help {fix, debug}ing a problem mailing to
smtp.gmail.com (and other TLS-using mail hosts) using smtpmail.
Apologies if this should go to bug-gnu-emacs (but it's probably a
configuration problem) or if it's a FAQ (but my searches haven't found
that). (Note that, while searching, I've read
http://www.gnu.org/software/emacs/manual/html_node/smtpmail/index.html
http://www.gnu.org/software/emacs/windows/Network-access.html
http://justinsboringpage.blogspot.com/2009/02/sending-email-via-gmail-in-emacs.html
http://obfuscatedcode.wordpress.com/2007/04/26/configuring-emacs-for-gmails-smtp/
http://josefsson.org/emacs-smtp-starttls.html
and several list and newsgroup posts.) Please let me know if this
forum is in/appropriate, and feel free to reply directly to me as well
as to the list.
I'm running GNU Emacs 22.2.1, as installed by ubuntu package=
emacs22-gtk, on xubuntu 9.04, which is patched up-to-date. I'd like to
enable mail sending directly from emacs, since that's where I actually
compose mail. I don't currently want to use emacs to read/store mail,
since gmail seems to work pretty well for that. Hence I'd like to keep
the MUA simple, and smtpmail.el seems to be the simplest emacs MUA.
(Am I missing something?) My emacs seems to be pretty well setup for
that, since
* M-x load-library starttls.el finds it in
/usr/share/emacs/22.2/lisp/gnus/starttls.el.gz
* M-x load-library smtpmail.el finds it in
/usr/share/emacs/22.2/lisp/mail/smtpmail.el.gz
I have also installed package=gnutls-bin, and can
tlroche@tlrZ61t:~$ gnutls-cli -s -p 587 smtp.gmail.com
> Resolving 'smtp.gmail.com'...
> Connecting to '72.14.247.109:587'...
>
> - Simple Client Mode:
>
> 220 mx.google.com ESMTP 30sm668279agc.59
> ^C
I have also made
tlroche@tlrZ61t:~$ cat ~/.authinfo
> machine smtp.pobox.com login <id omitted/> password <pw omitted/>
> machine smtp.gmail.com login <id omitted/> password <pw omitted/>
In my init.el I have
> ;; debugging==t
> (setq smtpmail-debug-info t)
> (setq smtpmail-debug-verb t)
> ;; "must be set before the SMTP library is loaded"?
> (setq smtpmail-default-smtp-server "smtp.gmail.com")
> (setq user-full-name "Tom Roche")
> ;; use the default MUA
> (setq send-mail-function 'smtpmail-send-it)
> (setq message-send-mail-function 'smtpmail-send-it)
> (setq smtpmail-auth-credentials (expand-file-name "~/.authinfo"))
> (setq user-mail-address "tlroche@gmail.com")
> (setq smtpmail-smtp-server "smtp.gmail.com")
> (setq smtpmail-smtp-service 587)
> ;; Use STARTTLS without authentication against the server.
> (setq smtpmail-starttls-credentials
> '((smtpmail-smtp-server smtpmail-smtp-service nil nil))
> )
> (setq starttls-use-gnutls t)
> (setq starttls-program "gnutls-cli") ; from ubuntu package=gnutls-bin
> (require 'smtpmail)
> (require 'starttls)
and I've verified that those vars get loaded. But when I try to send
a simple message via
C-x m
twiddle buffer
C-c C-c
I get
*trace of SMTP session to smtp.gmail.com*
> Process SMTP deleted
> 220 mx.google.com ESMTP 7sm1834314agb.41
> EHLO tlrZ61t.ubuntu-domain
> 250-mx.google.com at your service, [69.134.240.67]
> 250-SIZE 35651584
> 250-8BITMIME
> 250-STARTTLS
> 250-ENHANCEDSTATUSCODES
> 250 PIPELINING
> MAIL FROM:<tlroche@gmail.com> SIZE=289
> 530 5.7.0 Must issue a STARTTLS command first. 7sm1834314agb.41
> QUIT
> 221 2.0.0 closing connection 7sm1834314agb.41
So apparently I need to configure myself to utter a STARTTLS command
when sending mail. If so, how to do that? If not, what am I missing?
Your suggestions regarding
* how to debug this problem
* how to fix this problem
* how to avoid this problem (i.e. better ways to approach this task,
given that I'd like to keep it simple)
* better places to seek help
are appreciated. TIA, Tom Roche <Tom_Roche@pobox.com>
next reply other threads:[~2009-07-18 4:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-18 4:46 Tom Roche [this message]
2009-07-18 5:23 ` [22] problem configuring smtpmail for gmail.com Thierry Volpiatto
-- strict thread matches above, loose matches on Subject: below --
2009-07-18 17:41 Tom Roche
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=20090718044623.01C6A14084B3B@cedar.isis.unc.edu \
--to=tom_roche@pobox.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.