summaryrefslogtreecommitdiff
path: root/lisp/mail/smtpmail.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/mail/smtpmail.el')
-rw-r--r--lisp/mail/smtpmail.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el
index 3c9ea9de573..3fd2d9ddf21 100644
--- a/lisp/mail/smtpmail.el
+++ b/lisp/mail/smtpmail.el
@@ -488,9 +488,9 @@ The list is in preference order.")
(secret . "SMTP password for %u@%h: ")))
(auth-info (car
(auth-source-search
- :max 1
:host host
:port port
+ :max 1
:require (and ask-for-password
'(:user :secret))
:create ask-for-password)))
@@ -615,6 +615,8 @@ The list is in preference order.")
(and mail-specify-envelope-from
(mail-envelope-from))
user-mail-address))
+ (coding-system-for-read 'binary)
+ (coding-system-for-write 'binary)
response-code
process-buffer
result
@@ -651,7 +653,9 @@ The list is in preference order.")
;; If we couldn't access the server at all, we give up.
(unless (setq process (car result))
- (throw 'done "Unable to contact server"))
+ (throw 'done (if (plist-get (cdr result) :error)
+ (plist-get (cdr result) :error)
+ "Unable to contact server")))
;; set the send-filter
(set-process-filter process 'smtpmail-process-filter)