Mercurial > emacs
diff lisp/mail/smtpmail.el @ 88123:375f2633d815
New directory
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Mon, 08 Sep 2003 11:56:09 +0000 |
parents | 695cf19ef79e |
children | 68c22ea6027c |
line wrap: on
line diff
--- a/lisp/mail/smtpmail.el Thu Sep 04 04:00:49 2003 +0000 +++ b/lisp/mail/smtpmail.el Mon Sep 08 11:56:09 2003 +0000 @@ -212,7 +212,7 @@ ;;; (defvar smtpmail-mail-address nil - "Value to use for envelope-from address for mail from ambient buffer.") + "Value of `user-mail-address' in ambient buffer.") ;;;###autoload (defun smtpmail-send-it () @@ -223,11 +223,7 @@ (case-fold-search nil) delimline (mailbuf (current-buffer)) - ;; Examine this variable now, so that - ;; local binding in the mail buffer will take effect. - (smtpmail-mail-address - (or (and mail-specify-envelope-from (mail-envelope-from)) - user-mail-address)) + (smtpmail-mail-address user-mail-address) (smtpmail-code-conv-from (if enable-multibyte-characters (let ((sendmail-coding-system smtpmail-code-conv-from)) @@ -403,14 +399,11 @@ (with-temp-buffer (let ((coding-system-for-read 'no-conversion)) (insert-file-contents file-msg)) - (let ((smtpmail-mail-address - (or (and mail-specify-envelope-from (mail-envelope-from)) - user-mail-address))) - (if (not (null smtpmail-recipient-address-list)) - (if (not (smtpmail-via-smtp smtpmail-recipient-address-list - (current-buffer))) - (error "Sending failed; SMTP protocol error")) - (error "Sending failed; no recipients")))) + (if (not (null smtpmail-recipient-address-list)) + (if (not (smtpmail-via-smtp smtpmail-recipient-address-list + (current-buffer))) + (error "Sending failed; SMTP protocol error")) + (error "Sending failed; no recipients"))) (delete-file file-msg) (delete-file (concat file-msg ".el")) (delete-region (point-at-bol) (point-at-bol 2))) @@ -552,12 +545,9 @@ (host (or smtpmail-smtp-server (error "`smtpmail-smtp-server' not defined"))) (port smtpmail-smtp-service) - ;; smtpmail-mail-address should be set to the appropriate - ;; buffer-local value by the caller, but in case not: - (envelope-from (or smtpmail-mail-address - (and mail-specify-envelope-from - (mail-envelope-from)) - user-mail-address)) + (envelope-from (or (mail-envelope-from) + smtpmail-mail-address + user-mail-address)) response-code greeting process-buffer @@ -707,7 +697,7 @@ ""))) ; (smtpmail-send-command process (format "MAIL FROM:%s@%s" (user-login-name) (smtpmail-fqdn))) (smtpmail-send-command process (format "MAIL FROM: <%s>%s%s" - envelope-from + envelope-from size-part body-part)) @@ -960,5 +950,4 @@ (provide 'smtpmail) -;;; arch-tag: a76992df-6d71-43b7-9e72-4bacc6c05466 ;;; smtpmail.el ends here