bug-gnu-emacs
[Top][All Lists]
Advanced

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

smtpmail.el sends mail without date header


From: Gary Houston
Subject: smtpmail.el sends mail without date header
Date: 24 Oct 2001 00:50:39 +0100

When Rmail uses smtpmail.el, mail is sent without a date header.  This
is undesirable since the mail transport system isn't guaranteed to add
the header.

The configuration is:

(setq smtpmail-default-smtp-server "localhost")
(load "smtpmail")
(setq send-mail-function 'smtpmail-send-it)

A possible fix is:

--- emacs-21.1/lisp/mail/smtpmail.el    Tue Aug  7 14:43:48 2001
+++ /usr/share/emacs/21.1/lisp/mail/smtpmail.el Tue Oct 23 21:02:15 2001
@@ -232,6 +232,9 @@
                         (insert ")\n"))
                        ((null mail-from-style)
                         (insert "From: " login "\n")))))
+            (goto-char (point-min))
+           (if (not (re-search-forward "^Date:" delimline t))
+               (insert "Date: " (mail-rfc822-date) "\n"))
            ;; Insert an extra newline if we need it to work around
            ;; Sun's bug that swallows newlines.
            (goto-char (1+ delimline))




reply via email to

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