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

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

fix for smtpmail.el when sending many mails to queue


From: Simon Josefsson
Subject: fix for smtpmail.el when sending many mails to queue
Date: Wed, 24 Apr 2002 21:21:22 +0200
User-agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2 (i686-pc-linux-gnu)

I have had this patch installed in my smtpmail.el copy for a while, I
think it is good.  (I'm sending this separately from the next patch to
keep things more separated.)

2002-04-24  Simon Josefsson  <jas@extundo.com>

        * mail/smtpmail.el (smtpmail-queue-counter): New internal
        variable.
        (smtpmail-send-it): Use it to construct new queue filenames
        (needed if you send more than one message per second, which is
        possible if you use Gnus Agent).

--- smtpmail.el.~1.38.~ Wed Apr 24 21:13:38 2002
+++ smtpmail.el Wed Apr 24 21:20:15 2002
@@ -35,7 +35,7 @@
 ;; Please add these lines in your .emacs(_emacs) or use customize.
 ;;
 ;;(setq send-mail-function 'smtpmail-send-it) ; if you use `mail'
-;;(setq message-send-mail-function 'smtpmail-send-it) ; if you are using Gnus.
+;;(setq message-send-mail-function 'smtpmail-send-it) ; if you use message/Gnus
 ;;(setq smtpmail-default-smtp-server "YOUR SMTP HOST")
 ;;(setq smtpmail-local-domain "YOUR DOMAIN NAME")
 ;;(setq smtpmail-sendto-domain "YOUR DOMAIN NAME")
@@ -191,6 +191,8 @@
 (defvar smtpmail-address-buffer)
 (defvar smtpmail-recipient-address-list)
 
+(defvar smtpmail-queue-counter 0)
+
 ;; Buffer-local variable.
 (defvar smtpmail-read-point)
 
@@ -334,8 +336,10 @@
            (let* ((file-data (concat 
                               smtpmail-queue-dir
                               (concat (time-stamp-yyyy-mm-dd)
-                                      "_" (time-stamp-hh:mm:ss))))
-                     (file-data (convert-standard-filename file-data))
+                                      "_" (time-stamp-hh:mm:ss)
+                                      "_"
+                                      (setq smtpmail-queue-counter
+                                            (1+ smtpmail-queue-counter)))))
                      (file-elisp (concat file-data ".el"))
                   (buffer-data (create-file-buffer file-data))
                   (buffer-elisp (create-file-buffer file-elisp))




reply via email to

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