changeset 53619:f69d407a9996

Jesper Harder <harder@ifa.au.dk> (smtpmail-send-data): Don't append spurious newline.
author Glenn Morris <rgm@gnu.org>
date Sun, 18 Jan 2004 14:10:39 +0000
parents bd715b02e44e
children d802aae7d68d
files lisp/mail/smtpmail.el
diffstat 1 files changed, 5 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/smtpmail.el	Sun Jan 18 14:00:34 2004 +0000
+++ b/lisp/mail/smtpmail.el	Sun Jan 18 14:10:39 2004 +0000
@@ -858,31 +858,15 @@
   )
 
 (defun smtpmail-send-data (process buffer)
-  (let
-      ((data-continue t)
-       (sending-data nil)
-       this-line
-       this-line-end)
-
+  (let ((data-continue t) sending-data)
     (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)
-      )
-    )
-  )
-
+        (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>."