diff options
author | Lars Magne Ingebrigtsen <larsi@gnus.org> | 2011-08-21 21:27:27 +0200 |
---|---|---|
committer | Lars Magne Ingebrigtsen <larsi@gnus.org> | 2011-08-21 21:27:27 +0200 |
commit | c65c96228e787f20a7a0fb35657517931d881df5 (patch) | |
tree | 6fb8a63c9924e399091f109c6769e0a9b014c642 /lisp/mail/smtpmail.el | |
parent | ff98b2dd51e84b812e061859fa8c682d22b2e459 (diff) | |
download | emacs-c65c96228e787f20a7a0fb35657517931d881df5.tar.gz emacs-c65c96228e787f20a7a0fb35657517931d881df5.tar.bz2 emacs-c65c96228e787f20a7a0fb35657517931d881df5.zip |
Only bind `coding-system-for-*' around the process open call to avoid auth-source side effects.
Diffstat (limited to 'lisp/mail/smtpmail.el')
-rw-r--r-- | lisp/mail/smtpmail.el | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el index caec69e7e9e..381af3b963a 100644 --- a/lisp/mail/smtpmail.el +++ b/lisp/mail/smtpmail.el @@ -622,8 +622,6 @@ 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 @@ -642,21 +640,23 @@ The list is in preference order.") (erase-buffer)) ;; open the connection to the server - (setq result - (open-network-stream - "smtpmail" process-buffer host port - :type smtpmail-stream-type - :return-list t - :capability-command (format "EHLO %s\r\n" (smtpmail-fqdn)) - :end-of-command "^[0-9]+ .*\r\n" - :success "^2.*\n" - :always-query-capabilities t - :starttls-function - (lambda (capabilities) - (and (string-match "-STARTTLS" capabilities) - "STARTTLS\r\n")) - :client-certificate t - :use-starttls-if-possible t)) + (let ((coding-system-for-read 'binary) + (coding-system-for-write 'binary)) + (setq result + (open-network-stream + "smtpmail" process-buffer host port + :type smtpmail-stream-type + :return-list t + :capability-command (format "EHLO %s\r\n" (smtpmail-fqdn)) + :end-of-command "^[0-9]+ .*\r\n" + :success "^2.*\n" + :always-query-capabilities t + :starttls-function + (lambda (capabilities) + (and (string-match "-STARTTLS" capabilities) + "STARTTLS\r\n")) + :client-certificate t + :use-starttls-if-possible t))) ;; If we couldn't access the server at all, we give up. (unless (setq process (car result)) |