changeset 67873:51ca2759364a

Fix AUTH PLAIN authentication.
author Simon Josefsson <jas@extundo.com>
date Wed, 28 Dec 2005 08:45:53 +0000
parents a03cb96b7c8e
children c1ab9f9a59a7
files lisp/mail/smtpmail.el
diffstat 1 files changed, 4 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/smtpmail.el	Wed Dec 28 03:44:37 2005 +0000
+++ b/lisp/mail/smtpmail.el	Wed Dec 28 08:45:53 2005 +0000
@@ -560,16 +560,13 @@
 		(>= (car ret) 400))
 	    (throw 'done nil)))
        ((eq mech 'plain)
-	(smtpmail-send-command process "AUTH PLAIN")
-	(if (or (null (car (setq ret (smtpmail-read-response process))))
-		(not (integerp (car ret)))
-		(not (equal (car ret) 334)))
-	    (throw 'done nil))
-	(smtpmail-send-command process (base64-encode-string
+	(smtpmail-send-command process
+			       (concat "AUTH PLAIN "
+				       (base64-encode-string
 					(concat "\0"
 						(smtpmail-cred-user cred)
 						"\0"
-						passwd)))
+						passwd))))
 	(if (or (null (car (setq ret (smtpmail-read-response process))))
 		(not (integerp (car ret)))
 		(not (equal (car ret) 235)))