comparison lisp/mail/smtpmail.el @ 48846:2b2dc043271d

(smtpmail-via-smtp): Fall back to user-mail-address as sender.
author Simon Josefsson <jas@extundo.com>
date Sun, 15 Dec 2002 07:23:36 +0000
parents 03ac1463ec5e
children 0d8b17d428b5
comparison
equal deleted inserted replaced
48845:a1bf73b831bc 48846:2b2dc043271d
539 (defun smtpmail-via-smtp (recipient smtpmail-text-buffer) 539 (defun smtpmail-via-smtp (recipient smtpmail-text-buffer)
540 (let ((process nil) 540 (let ((process nil)
541 (host (or smtpmail-smtp-server 541 (host (or smtpmail-smtp-server
542 (error "`smtpmail-smtp-server' not defined"))) 542 (error "`smtpmail-smtp-server' not defined")))
543 (port smtpmail-smtp-service) 543 (port smtpmail-smtp-service)
544 (envelope-from (mail-envelope-from)) 544 (envelope-from (or (mail-envelope-from)
545 smtpmail-mail-address
546 user-mail-address))
545 response-code 547 response-code
546 greeting 548 greeting
547 process-buffer 549 process-buffer
548 (supported-extensions '())) 550 (supported-extensions '()))
549 (unwind-protect 551 (unwind-protect
689 " BODY=8BITMIME" 691 " BODY=8BITMIME"
690 "") 692 "")
691 ""))) 693 "")))
692 ; (smtpmail-send-command process (format "MAIL FROM:%s@%s" (user-login-name) (smtpmail-fqdn))) 694 ; (smtpmail-send-command process (format "MAIL FROM:%s@%s" (user-login-name) (smtpmail-fqdn)))
693 (smtpmail-send-command process (format "MAIL FROM: <%s>%s%s" 695 (smtpmail-send-command process (format "MAIL FROM: <%s>%s%s"
694 (or envelope-from 696 envelope-from
695 smtpmail-mail-address)
696 size-part 697 size-part
697 body-part)) 698 body-part))
698 699
699 (if (or (null (car (setq response-code (smtpmail-read-response process)))) 700 (if (or (null (car (setq response-code (smtpmail-read-response process))))
700 (not (integerp (car response-code))) 701 (not (integerp (car response-code)))
701 (>= (car response-code) 400)) 702 (>= (car response-code) 400))
702 (throw 'done nil) 703 (throw 'done nil)
703 )) 704 ))