aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris <[email protected]>2011-08-24 20:41:03 -0400
committerGlenn Morris <[email protected]>2011-08-24 20:41:03 -0400
commite5f1c99e958f4d9aad01eaa93b6b5760d31e5e58 (patch)
treeb3a9b97354936228e53d1e9e766d2daa4edea659
parentf22f4808a08e8f985d5e6175bbd13d5260e1ab1a (diff)
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 762779cc01..643ed72124 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2011-08-25 Glenn Morris <[email protected]>
+
+ * mail/smtpmail.el (smtpmail-smtp-user): Add version: tag.
+ (smtpmail-via-smtp): Handle nil response from smtp.
+
2011-08-24 Juri Linkov <[email protected]>
* proced.el (proced-marked): Inherit from `error' instead of
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el
index 40fbb07259..69c49c471c 100644
--- a/lisp/mail/smtpmail.el
+++ b/lisp/mail/smtpmail.el
@@ -88,6 +88,7 @@ The default value would be \"smtp\" or 25."
(defcustom smtpmail-smtp-user nil
"User name to use when looking up credentials."
+ :version "24.1"
:type '(choice (const nil) string)
:group 'smtpmail)
@@ -677,7 +678,7 @@ The list is in preference order.")
(throw 'done (format "No greeting: %s" greeting)))
(when (>= code 400)
(throw 'done (format "Connection not allowed: %s" greeting))))
-
+
(with-current-buffer process-buffer
(set-buffer-process-coding-system 'raw-text-unix 'raw-text-unix)
(make-local-variable 'smtpmail-read-point)
@@ -730,7 +731,7 @@ The list is in preference order.")
(when (member 'xusr supported-extensions)
(smtpmail-command-or-throw process (format "XUSR")))
-
+
;; MAIL FROM:<sender>
(let ((size-part
(if (or (member 'size supported-extensions)
@@ -769,7 +770,7 @@ The list is in preference order.")
)
((and auth-mechanisms
(not ask-for-password)
- (= (car result) 530))
+ (eq (car result) 530))
;; We got a "530 auth required", so we close and try
;; again, this time asking the user for a password.
(smtpmail-send-command process "QUIT")
@@ -796,6 +797,7 @@ The list is in preference order.")
nil)
((and auth-mechanisms
(not ask-for-password)
+ (integerp (car result))
(>= (car result) 550)
(<= (car result) 554))
;; We got a "550 relay not permitted" (or the like),