# HG changeset patch # User Simon Josefsson # Date 1135759553 0 # Node ID 51ca2759364a857e812e2bb03b77c8add8a51427 # Parent a03cb96b7c8ef61c8e23271e98ffc714f74e13f1 Fix AUTH PLAIN authentication. diff -r a03cb96b7c8e -r 51ca2759364a lisp/mail/smtpmail.el --- 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)))