Skip to main content
2 of 3
Improve formatting
Basil
  • 12.6k
  • 44
  • 70

Gnus send multiple emails

I want to send multiple emails from Gnus. I have over 1000 addresses. I have found a great solution here: https://lists.gnu.org/archive/html/help-gnu-emacs/2014-04/msg00584.html

(defun message-send-and-exit-multiple ()
  (interactive)
  (let ((addresses 
         (split-string 
          (message-fetch-field "All")
          "," t)))
    (while addresses
      (let ((address (car addresses)))
        (setq addresses (cdr addresses))
        (message-remove-header "To")
        (message-add-header (format "To: %s" address))
        (if addresses
            (message-send)
          (message-send-and-exit))))))

But Emacs asks me for every email: "Already sent message via mail; resend? (y or n)". So how I can automate the process? Also maybe it would be a good idea to add some sleep between sending emails? Like send 50 emails wait some time then send another?

slk500
  • 473
  • 2
  • 15