diff options
author | Lars Magne Ingebrigtsen <larsi@gnus.org> | 2011-07-03 22:09:38 +0200 |
---|---|---|
committer | Lars Magne Ingebrigtsen <larsi@gnus.org> | 2011-07-03 22:09:38 +0200 |
commit | 6567659206992985307ef5dd19bcbecf975634c8 (patch) | |
tree | c20f4964cd0e603f1c173e46e3c29eca00ebd311 /lisp/mail/feedmail.el | |
parent | c7f98048774c68d0e169763c1819452d272bceee (diff) | |
download | emacs-6567659206992985307ef5dd19bcbecf975634c8.tar.gz |
* mail/feedmail.el (feedmail-buffer-to-smtpmail):
`smtpmail-via-smtp' now returns the error instead of nil.
Diffstat (limited to 'lisp/mail/feedmail.el')
-rw-r--r-- | lisp/mail/feedmail.el | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/lisp/mail/feedmail.el b/lisp/mail/feedmail.el index 934637ecbbd..bc9a0604279 100644 --- a/lisp/mail/feedmail.el +++ b/lisp/mail/feedmail.el @@ -1633,22 +1633,21 @@ local gurus." ;; no evil. (feedmail-say-debug ">in-> feedmail-buffer-to-smtpmail %s" addr-listoid) (require 'smtpmail) - (if (not (smtpmail-via-smtp addr-listoid prepped)) - (progn - (set-buffer errors-to) - (insert "Send via smtpmail failed. Probable SMTP protocol error.\n") - (insert "Look for details below or in the *Messages* buffer.\n\n") - (let ((case-fold-search t) - ;; don't be overconfident about the name of the trace buffer - (tracer (concat "trace.*smtp.*" (regexp-quote smtpmail-smtp-server)))) - (mapcar - (lambda (buffy) - (if (string-match tracer (buffer-name buffy)) - (progn - (insert "SMTP Trace from " (buffer-name buffy) "\n---------------") - (insert-buffer-substring buffy) - (insert "\n\n")))) - (buffer-list)))))) + (let ((result (smtpmail-via-smtp addr-listoid prepped))) + (when result + (set-buffer errors-to) + (insert "Send via smtpmail failed: %s" result) + (let ((case-fold-search t) + ;; don't be overconfident about the name of the trace buffer + (tracer (concat "trace.*smtp.*" (regexp-quote smtpmail-smtp-server)))) + (mapcar + (lambda (buffy) + (if (string-match tracer (buffer-name buffy)) + (progn + (insert "SMTP Trace from " (buffer-name buffy) "\n---------------") + (insert-buffer-substring buffy) + (insert "\n\n")))) + (buffer-list)))))) (declare-function smtp-via-smtp "ext:smtp" (sender recipients smtp-text-buffer)) (defvar smtp-server) |