Mercurial > emacs
comparison lisp/mail/smtpmail.el @ 67873:51ca2759364a
Fix AUTH PLAIN authentication.
author | Simon Josefsson <jas@extundo.com> |
---|---|
date | Wed, 28 Dec 2005 08:45:53 +0000 |
parents | 02c3cfe8d00b |
children | 340b01243a62 |
comparison
equal
deleted
inserted
replaced
67872:a03cb96b7c8e | 67873:51ca2759364a |
---|---|
558 (if (or (null (car (setq ret (smtpmail-read-response process)))) | 558 (if (or (null (car (setq ret (smtpmail-read-response process)))) |
559 (not (integerp (car ret))) | 559 (not (integerp (car ret))) |
560 (>= (car ret) 400)) | 560 (>= (car ret) 400)) |
561 (throw 'done nil))) | 561 (throw 'done nil))) |
562 ((eq mech 'plain) | 562 ((eq mech 'plain) |
563 (smtpmail-send-command process "AUTH PLAIN") | 563 (smtpmail-send-command process |
564 (if (or (null (car (setq ret (smtpmail-read-response process)))) | 564 (concat "AUTH PLAIN " |
565 (not (integerp (car ret))) | 565 (base64-encode-string |
566 (not (equal (car ret) 334))) | |
567 (throw 'done nil)) | |
568 (smtpmail-send-command process (base64-encode-string | |
569 (concat "\0" | 566 (concat "\0" |
570 (smtpmail-cred-user cred) | 567 (smtpmail-cred-user cred) |
571 "\0" | 568 "\0" |
572 passwd))) | 569 passwd)))) |
573 (if (or (null (car (setq ret (smtpmail-read-response process)))) | 570 (if (or (null (car (setq ret (smtpmail-read-response process)))) |
574 (not (integerp (car ret))) | 571 (not (integerp (car ret))) |
575 (not (equal (car ret) 235))) | 572 (not (equal (car ret) 235))) |
576 (throw 'done nil))) | 573 (throw 'done nil))) |
577 | 574 |