aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa1999-05-25 11:12:17 +0000
committerKenichi Handa1999-05-25 11:12:17 +0000
commit83af570eae8668c9308050c1bb56b7bd10c0e4e7 (patch)
tree179f05091317f820328a899f3d0b451c61e3f0bb
parentbae7e4e6487b2128a991c525024dcdac06b2a8ad (diff)
downloademacs-83af570eae8668c9308050c1bb56b7bd10c0e4e7.tar.gz
emacs-83af570eae8668c9308050c1bb56b7bd10c0e4e7.zip
(smtpmail-send-it): Bind
smtpmail-code-conv-from properly. (smtpmail-send-data-1): If DATA is a multibyte string, encode it by smtpmail-code-conv-from.
-rw-r--r--lisp/mail/smtpmail.el12
1 files changed, 9 insertions, 3 deletions
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el
index 4778ded17bd..192235a2423 100644
--- a/lisp/mail/smtpmail.el
+++ b/lisp/mail/smtpmail.el
@@ -122,7 +122,11 @@ This is relative to `smtpmail-queue-dir'.")
122 (tembuf (generate-new-buffer " smtpmail temp")) 122 (tembuf (generate-new-buffer " smtpmail temp"))
123 (case-fold-search nil) 123 (case-fold-search nil)
124 delimline 124 delimline
125 (mailbuf (current-buffer))) 125 (mailbuf (current-buffer))
126 (smtpmail-code-conv-from
127 (if enable-multibyte-characters
128 (let ((sendmail-coding-system smtpmail-code-conv-from))
129 (select-message-coding-system)))))
126 (unwind-protect 130 (unwind-protect
127 (save-excursion 131 (save-excursion
128 (set-buffer tembuf) 132 (set-buffer tembuf)
@@ -564,8 +568,10 @@ This is relative to `smtpmail-queue-dir'.")
564(defun smtpmail-send-data-1 (process data) 568(defun smtpmail-send-data-1 (process data)
565 (goto-char (point-max)) 569 (goto-char (point-max))
566 570
567 (when smtpmail-code-conv-from 571 (if (and (multibyte-string-p data)
568 (setq data (encode-coding-string data *internal* smtpmail-code-conv-from))) 572 smtpmail-code-conv-from)
573 (setq data (string-as-multibyte
574 (encode-coding-string data smtpmail-code-conv-from))))
569 575
570 (if smtpmail-debug-info 576 (if smtpmail-debug-info
571 (insert data "\r\n")) 577 (insert data "\r\n"))