aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2011-08-24 20:41:03 -0400
committerGlenn Morris2011-08-24 20:41:03 -0400
commite5f1c99e958f4d9aad01eaa93b6b5760d31e5e58 (patch)
treeb3a9b97354936228e53d1e9e766d2daa4edea659
parentf22f4808a08e8f985d5e6175bbd13d5260e1ab1a (diff)
downloademacs-e5f1c99e958f4d9aad01eaa93b6b5760d31e5e58.tar.gz
emacs-e5f1c99e958f4d9aad01eaa93b6b5760d31e5e58.zip
Minor smtpmail.el fixes.
* lisp/mail/smtpmail.el (smtpmail-smtp-user): Add version: tag. (smtpmail-via-smtp): Handle nil response from smtp.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/mail/smtpmail.el8
2 files changed, 10 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 762779cc01e..643ed72124e 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12011-08-25 Glenn Morris <rgm@gnu.org>
2
3 * mail/smtpmail.el (smtpmail-smtp-user): Add version: tag.
4 (smtpmail-via-smtp): Handle nil response from smtp.
5
12011-08-24 Juri Linkov <juri@jurta.org> 62011-08-24 Juri Linkov <juri@jurta.org>
2 7
3 * proced.el (proced-marked): Inherit from `error' instead of 8 * proced.el (proced-marked): Inherit from `error' instead of
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el
index 40fbb072594..69c49c471c0 100644
--- a/lisp/mail/smtpmail.el
+++ b/lisp/mail/smtpmail.el
@@ -88,6 +88,7 @@ The default value would be \"smtp\" or 25."
88 88
89(defcustom smtpmail-smtp-user nil 89(defcustom smtpmail-smtp-user nil
90 "User name to use when looking up credentials." 90 "User name to use when looking up credentials."
91 :version "24.1"
91 :type '(choice (const nil) string) 92 :type '(choice (const nil) string)
92 :group 'smtpmail) 93 :group 'smtpmail)
93 94
@@ -677,7 +678,7 @@ The list is in preference order.")
677 (throw 'done (format "No greeting: %s" greeting))) 678 (throw 'done (format "No greeting: %s" greeting)))
678 (when (>= code 400) 679 (when (>= code 400)
679 (throw 'done (format "Connection not allowed: %s" greeting)))) 680 (throw 'done (format "Connection not allowed: %s" greeting))))
680 681
681 (with-current-buffer process-buffer 682 (with-current-buffer process-buffer
682 (set-buffer-process-coding-system 'raw-text-unix 'raw-text-unix) 683 (set-buffer-process-coding-system 'raw-text-unix 'raw-text-unix)
683 (make-local-variable 'smtpmail-read-point) 684 (make-local-variable 'smtpmail-read-point)
@@ -730,7 +731,7 @@ The list is in preference order.")
730 731
731 (when (member 'xusr supported-extensions) 732 (when (member 'xusr supported-extensions)
732 (smtpmail-command-or-throw process (format "XUSR"))) 733 (smtpmail-command-or-throw process (format "XUSR")))
733 734
734 ;; MAIL FROM:<sender> 735 ;; MAIL FROM:<sender>
735 (let ((size-part 736 (let ((size-part
736 (if (or (member 'size supported-extensions) 737 (if (or (member 'size supported-extensions)
@@ -769,7 +770,7 @@ The list is in preference order.")
769 ) 770 )
770 ((and auth-mechanisms 771 ((and auth-mechanisms
771 (not ask-for-password) 772 (not ask-for-password)
772 (= (car result) 530)) 773 (eq (car result) 530))
773 ;; We got a "530 auth required", so we close and try 774 ;; We got a "530 auth required", so we close and try
774 ;; again, this time asking the user for a password. 775 ;; again, this time asking the user for a password.
775 (smtpmail-send-command process "QUIT") 776 (smtpmail-send-command process "QUIT")
@@ -796,6 +797,7 @@ The list is in preference order.")
796 nil) 797 nil)
797 ((and auth-mechanisms 798 ((and auth-mechanisms
798 (not ask-for-password) 799 (not ask-for-password)
800 (integerp (car result))
799 (>= (car result) 550) 801 (>= (car result) 550)
800 (<= (car result) 554)) 802 (<= (car result) 554))
801 ;; We got a "550 relay not permitted" (or the like), 803 ;; We got a "550 relay not permitted" (or the like),