]> code.delx.au - gnu-emacs/blobdiff - lisp/mail/smtpmail.el
(smtpmail-send-queued-mail): Add autoload cookie.
[gnu-emacs] / lisp / mail / smtpmail.el
index 78393348c5dfd86379a5585f52fbd7f474197426..b13ee6bda9d22469b5c33f36df1aad125802ca39 100644 (file)
@@ -378,6 +378,7 @@ This is relative to `smtpmail-queue-dir'.")
       (if (bufferp errbuf)
          (kill-buffer errbuf)))))
 
+;;;###autoload
 (defun smtpmail-send-queued-mail ()
   "Send mail that was queued as a result of setting `smtpmail-queue-mail'."
   (interactive)
@@ -540,6 +541,7 @@ 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))
        response-code
        greeting
        process-buffer
@@ -613,7 +615,7 @@ This is relative to `smtpmail-queue-dir'.")
            (if (and do-starttls
                     (smtpmail-find-credentials smtpmail-starttls-credentials host port)
                     (member 'starttls supported-extensions)
-                    (process-id process))
+                    (numberp (process-id process)))
                (progn
                  (smtpmail-send-command process (format "STARTTLS"))
                  (if (or (null (car (setq response-code (smtpmail-read-response process))))
@@ -689,7 +691,7 @@ 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 mail-envelope-from
+                                                    (or envelope-from
                                                         smtpmail-mail-address)
                                                     size-part
                                                     body-part))