From: torys.anderson@gmail.com (Tory S. Anderson)
To: Emacs Help List <help-gnu-emacs@gnu.org>
Subject: Re: > 24.3 can't send mail
Date: Sat, 07 Feb 2015 09:29:03 -0500 [thread overview]
Message-ID: <87fvahre1c.fsf@gmail.com> (raw)
In-Reply-To: <87oap5rghv.fsf@gmail.com> (Tory S. Anderson's message of "Sat, 07 Feb 2015 08:35:56 -0500")
I should add that the setup I'm using for mail, which has worked for years prior to 24.4+, is mostly borrowed from the emacs page http://www.emacswiki.org/emacs/SendingMail. To be precise, my source is this:
--8<---------------cut here---------------start------------->8---
(defvar smtp-accounts
'(
(ssl "torys.anderson@gmail.com" "smtp.gmail.com"
587 "torys.anderson@gmail.com" secret) ;; Public
;; other accounts omitted
))
;; Now lets configure smtpmail.el with your name and functions to send
;; mail using your smtp accounts by changing the from field
(require 'smtpmail)
(setq send-mail-function 'smtpmail-send-it
message-send-mail-function 'smtpmail-send-it
mail-from-style nil user-full-name "Tory S. Anderson"
smtpmail-debug-info t smtpmail-debug-verb t)
(defun set-smtp (mech server port user password)
"Set related SMTP variables for supplied parameters."
(setq smtpmail-smtp-server server smtpmail-smtp-service port
smtpmail-auth-credentials (list (list server port user
password)) smtpmail-auth-supported (list mech)
smtpmail-starttls-credentials nil)
(message "Setting SMTP server to `%s:%s' for user `%s'."
server port user))
(defun set-smtp-ssl (server port user password &optional key
cert)
"Set related SMTP and SSL variables for supplied parameters."
(setq starttls-use-gnutls t
starttls-gnutls-program "gnutls-cli"
starttls-extra-arguments nil smtpmail-smtp-server server
smtpmail-smtp-service port
smtpmail-auth-credentials (list (list server port user
password)) smtpmail-starttls-credentials (list (list
server port key cert)))
(message
"Setting SMTP server to `%s:%s' for user `%s'. (SSL
enabled.)" server port user))
(defun change-smtp ()
"Change the SMTP server according to the current from line."
(save-excursion
(loop with from = (save-restriction
(message-narrow-to-headers)
(message-fetch-field "from"))
for (auth-mech address . auth-spec) in smtp-accounts
when (string-match address from) do (cond
((memq auth-mech '(cram-md5 plain login))
(return (apply 'set-smtp (cons auth-mech auth-spec))))
((eql auth-mech 'ssl)
(return (apply 'set-smtp-ssl auth-spec)))
(t (error "Unrecognized SMTP auth. mechanism:
`%s'." auth-mech))) finally (error "Cannot infer SMTP information."))))
;; The previous function will complain if you fill the from field with
;; an account not present in smtp-accounts.
(defvar %smtpmail-via-smtp (symbol-function 'smtpmail-via-smtp))
(defun smtpmail-via-smtp (recipient smtpmail-text-buffer)
(with-current-buffer smtpmail-text-buffer
(change-smtp))
(funcall (symbol-value '%smtpmail-via-smtp) recipient
smtpmail-text-buffer))
;; Reply-to with same address it was sent to
(setq gnus-posting-styles
'(((header "to" "torys.anderson@gmail.com")
(address "torys.anderson@gmail.com"))
;; more omitted
))
--8<---------------cut here---------------end--------------->8---
torys.anderson@gmail.com (Tory S. Anderson) writes:
> I am unable to send mail in emacs 24.4 or 25.0.5; attempting to send gives me the error:
>
> 530 5.7.0 Must issue a STARTTLS command first. a41sm3439205yhb.43 - gsmtp
>
> According to what I can see by googling around, similar errors have been cropping up for years. I'm just not sure what would have changed between my working
> GNU Emacs 24.3.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.10.9) of 2014-09-30 on buildvm-10.phx2.fedoraproject.org
>
> and those later versions?
next prev parent reply other threads:[~2015-02-07 14:29 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-07 13:35 > 24.3 can't send mail Tory S. Anderson
2015-02-07 14:29 ` Tory S. Anderson [this message]
2015-02-07 14:49 ` Eli Zaretskii
2015-02-07 15:31 ` Tory S. Anderson
2015-02-07 15:37 ` Eli Zaretskii
2015-02-07 16:26 ` Tory S. Anderson
2015-02-07 17:51 ` Sivaram Neelakantan
2015-02-08 3:51 ` Dynamically switching send-mail settings (WAS: > 24.3 can't send mail) Tory S. Anderson
2015-02-08 21:49 ` Robert Thorpe
2015-02-09 2:54 ` Dynamically switching send-mail settings Tory S. Anderson
[not found] ` <mailman.19558.1423450457.1147.help-gnu-emacs@gnu.org>
2015-02-09 5:03 ` Lars Magne Ingebrigtsen
2015-02-09 12:18 ` Tory S. Anderson
2015-02-18 1:20 ` Lars Ingebrigtsen
2015-02-18 2:10 ` Tory S. Anderson
2015-04-15 16:08 ` 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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fvahre1c.fsf@gmail.com \
--to=torys.anderson@gmail.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.
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 read-only IMAP folder(s) and NNTP newsgroup(s).