emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r104914: * mail/feedmail.el (feedmail


From: Lars Magne Ingebrigtsen
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r104914: * mail/feedmail.el (feedmail-buffer-to-smtpmail):
Date: Sun, 03 Jul 2011 22:09:38 +0200
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 104914
committer: Lars Magne Ingebrigtsen <address@hidden>
branch nick: trunk
timestamp: Sun 2011-07-03 22:09:38 +0200
message:
  * mail/feedmail.el (feedmail-buffer-to-smtpmail):
  `smtpmail-via-smtp' now returns the error instead of nil.
modified:
  lisp/ChangeLog
  lisp/mail/feedmail.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-07-03 20:02:14 +0000
+++ b/lisp/ChangeLog    2011-07-03 20:09:38 +0000
@@ -1,5 +1,8 @@
 2011-07-03  Lars Magne Ingebrigtsen  <address@hidden>
 
+       * mail/feedmail.el (feedmail-buffer-to-smtpmail):
+       `smtpmail-via-smtp' now returns the error instead of nil.
+
        * isearch.el (isearch-search-fun-function): Clarify the doc string
        (bug#8101).
 

=== modified file 'lisp/mail/feedmail.el'
--- a/lisp/mail/feedmail.el     2011-05-23 17:57:17 +0000
+++ b/lisp/mail/feedmail.el     2011-07-03 20:09:38 +0000
@@ -1633,22 +1633,21 @@
   ;; 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)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]