diff --git a/ChangeLog b/ChangeLog index 07fda800a33..98c4d6dcdbe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-11-13 Simon Josefsson + + * mail/smtpmail.el (smtpmail-via-smtp): Fall back to + user-mail-address as sender. + 2002-12-09 Markus Rost * configure.in (*-sunos5*, *-solaris*): Revert previous change - diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el index b13ee6bda9d..17b02e3d6f9 100644 --- a/lisp/mail/smtpmail.el +++ b/lisp/mail/smtpmail.el @@ -541,7 +541,9 @@ This is relative to `smtpmail-queue-dir'.") (host (or smtpmail-smtp-server (error "`smtpmail-smtp-server' not defined"))) (port smtpmail-smtp-service) - (envelope-from (mail-envelope-from)) + (envelope-from (or (mail-envelope-from) + smtpmail-mail-address + user-mail-address)) response-code greeting process-buffer @@ -691,11 +693,10 @@ This is relative to `smtpmail-queue-dir'.") ""))) ; (smtpmail-send-command process (format "MAIL FROM:%s@%s" (user-login-name) (smtpmail-fqdn))) (smtpmail-send-command process (format "MAIL FROM: <%s>%s%s" - (or envelope-from - smtpmail-mail-address) + envelope-from size-part body-part)) - + (if (or (null (car (setq response-code (smtpmail-read-response process)))) (not (integerp (car response-code))) (>= (car response-code) 400))