From: Lars Magne Ingebrigtsen Date: Thu, 29 Jan 2015 02:22:21 +0000 (+0000) Subject: lisp/gnus/message.el (message-smtpmail-send-it): Make non-standard mail header separa... X-Git-Tag: emacs-25.0.90~2572^2~31 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=212c818940c420d2ef36a31ccb2fc0a110b1588b;p=emacs.git lisp/gnus/message.el (message-smtpmail-send-it): Make non-standard mail header separators work with smtpmail --- diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index a200216424d..3927f090d76 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2015-01-29 Lars Ingebrigtsen + + * message.el (message-smtpmail-send-it): Remove the mail header + separator before sending. + 2015-01-28 Elias Oltmanns * nnimap.el (nnimap-find-expired-articles): Fix handling of diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index de7e9bab8ec..a06de2a6414 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -4906,6 +4906,11 @@ evaluates `message-send-mail-hook' just before sending a message. It is useful if your ISP requires the POP-before-SMTP authentication. See the Gnus manual for details." (run-hooks 'message-send-mail-hook) + ;; Change header-delimiter to be what smtpmail expects. + (goto-char (point-min)) + (when (re-search-forward + (concat "^" (regexp-quote mail-header-separator) "\n")) + (replace-match "\n")) (smtpmail-send-it)) (defun message-send-mail-with-mailclient ()