[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
smtpmail appends spurious empty line
From: |
Jesper Harder |
Subject: |
smtpmail appends spurious empty line |
Date: |
Fri, 28 Nov 2003 00:33:50 +0100 |
User-agent: |
Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) |
In GNU Emacs 21.3.50.75 (i686-pc-linux-gnu, GTK+ Version 2.0.2)
smtpmail.el appends a spurious empty line to messages. This violates
a MUST in RFC 2821, Section 4.1.1.4:
The mail data is terminated by a line containing only a period,
that is, the character sequence "<CRLF>.<CRLF>" (see section
4.5.2). This is the end of mail data indication. Note that the
first <CRLF> of this terminating sequence is also the <CRLF> that
ends the final line of the data (message text) or, if there was no
data, ends the DATA command itself. An extra <CRLF> MUST NOT be
added, as that would cause an empty line to be added to the
message.
2003-11-28 Jesper Harder <address@hidden>
* mail/smtpmail.el (smtpmail-send-data): Don't append spurious
newline.
*** /home/harder/emacs/lisp/mail/smtpmail.el.~1.61.~ Sun Sep 28 20:12:31 2003
--- /home/harder/emacs/lisp/mail/smtpmail.el Fri Nov 28 00:20:35 2003
***************
*** 858,888 ****
)
(defun smtpmail-send-data (process buffer)
! (let
! ((data-continue t)
! (sending-data nil)
! this-line
! this-line-end)
!
(with-current-buffer buffer
(goto-char (point-min)))
-
(while data-continue
(with-current-buffer buffer
! (beginning-of-line)
! (setq this-line (point))
! (end-of-line)
! (setq this-line-end (point))
! (setq sending-data nil)
! (setq sending-data (buffer-substring this-line this-line-end))
! (if (/= (forward-line 1) 0)
! (setq data-continue nil)))
!
! (smtpmail-send-data-1 process sending-data)
! )
! )
! )
!
(defun smtpmail-deduce-address-list (smtpmail-text-buffer header-start
header-end)
"Get address list suitable for smtp RCPT TO: <address>."
--- 858,872 ----
)
(defun smtpmail-send-data (process buffer)
! (let ((data-continue t) sending-data)
(with-current-buffer buffer
(goto-char (point-min)))
(while data-continue
(with-current-buffer buffer
! (setq sending-data (buffer-substring (point-at-bol) (point-at-eol)))
! (end-of-line 2)
! (setq data-continue (not (eobp))))
! (smtpmail-send-data-1 process sending-data))))
(defun smtpmail-deduce-address-list (smtpmail-text-buffer header-start
header-end)
"Get address list suitable for smtp RCPT TO: <address>."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- smtpmail appends spurious empty line,
Jesper Harder <=