emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/mail/smtpmail.el


From: Glenn Morris
Subject: [Emacs-diffs] Changes to emacs/lisp/mail/smtpmail.el
Date: Tue, 26 Aug 2003 13:42:28 -0400

Index: emacs/lisp/mail/smtpmail.el
diff -c emacs/lisp/mail/smtpmail.el:1.58 emacs/lisp/mail/smtpmail.el:1.59
*** emacs/lisp/mail/smtpmail.el:1.58    Sun Aug 24 11:23:12 2003
--- emacs/lisp/mail/smtpmail.el Tue Aug 26 13:42:27 2003
***************
*** 223,228 ****
--- 223,230 ----
        (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))
***************
*** 401,411 ****
        (with-temp-buffer
          (let ((coding-system-for-read 'no-conversion))
            (insert-file-contents file-msg))
!         (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)))
--- 403,416 ----
        (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"))))
        (delete-file file-msg)
        (delete-file (concat file-msg ".el"))
        (delete-region (point-at-bol) (point-at-bol 2)))
***************
*** 547,552 ****
--- 552,563 ----
        (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))
        response-code
        greeting
        process-buffer
***************
*** 696,702 ****
                     "")))
  ;           (smtpmail-send-command process (format "MAIL FROM:address@hidden" 
(user-login-name) (smtpmail-fqdn)))
              (smtpmail-send-command process (format "MAIL FROM: <%s>%s%s"
!                                                      smtpmail-mail-address
                                                     size-part
                                                     body-part))
  
--- 707,713 ----
                     "")))
  ;           (smtpmail-send-command process (format "MAIL FROM:address@hidden" 
(user-login-name) (smtpmail-fqdn)))
              (smtpmail-send-command process (format "MAIL FROM: <%s>%s%s"
!                                                      envelope-from
                                                     size-part
                                                     body-part))
  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]