From c3f69831cb76026c71a047d7fa4036ee436896d8 Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Wed, 28 Dec 2005 08:46:05 +0000 Subject: [PATCH] Fix AUTH PLAIN authentication. --- lisp/ChangeLog | 5 +++++ lisp/mail/smtpmail.el | 11 ++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fc9221e9a84..b327ed6c20f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2005-12-05 Ralf Angeli + + * mail/smtpmail.el (smtpmail-try-auth-methods): Send + credentials together with "AUTH PLAIN" command. + 2005-12-27 Richard M. Stallman * mouse.el (mouse-drag-region-1): When remapping mouse-1 to diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el index 0eb956981ce..76598ab8a8d 100644 --- a/lisp/mail/smtpmail.el +++ b/lisp/mail/smtpmail.el @@ -560,16 +560,13 @@ This is relative to `smtpmail-queue-dir'.") (>= (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))) -- 2.39.5