Gnus development mailing list
 help / color / mirror / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: Bob Newell <bobnewell@bobnewell.net>
Cc: ding@gnus.org
Subject: Re: Multiple Mailings
Date: Mon, 09 Sep 2019 15:50:32 +0800	[thread overview]
Message-ID: <87h85lq56f.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <87lfuxq57r.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Mon, 09 Sep 2019 15:49:44 +0800")

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> On 09/08/19 18:33 PM, Bob Newell wrote:
>> I see what you are doing in your code, but it didn't quite work for me
>> although I'm sure with some tweaking it could.
>>
>> I solved the issue another way, which is hackish but at least a little
>> less so. The code is below; it's for my own environment, but could be
>> generally useful if the connectivity check were to be removed. I can't
>> take much credit; it's mostly stuff found on the web with a few of my
>> own changes.
>>
>> I now get around the prompting by resetting 'message-sent-message-via to
>> nil, so gnus doesn't realize I'm sending duplicates and therefore
>> doesn't nag.
>>
>> I tie 'message-send-and-exit-multiple to C-c C-m C-m in 'message-mode-map.
>>
>> (defun message-send-and-exit-multiple ()
>>   (interactive) 
>> ;;; Check connectivity once, assume(!) it stays up for the duration of
>> ;;; the mass mailing.
>>   (if (outbound-port-test "smtp.gmail.com" 587)
>>       (progn
>> 	(let ((addresses
>> 	       (split-string
>> 		(message-fetch-field "To")
>> 		"," t)))
>> 	  (while addresses
>> 	    ;; Avoid prompts for mailing duplicate copies.
>> 	    (setq message-sent-message-via nil)
>> 	    (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))))))
>>        (message "No smtp connectivity, save as draft instead")))
>
> I don't suppose it really matters in the end, though the one thing I
> would be wary of is the potential of sending multiple messages with the
> same message ID. You're probably not going to end up breaking the
> internet if you do, but I wouldn't be surprised if there's plenty of
> software out there (including Gnus) that might get confused by identical
> IDs.
>
> Let's see if that actually happens...
>
> Looks like it does?

No it doesn't! It resets the message-id.

Anyway! I still think it would be cleaner just to compose and send a
series of messages.



  parent reply	other threads:[~2019-09-09  7:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-08 19:07 Bob Newell
2019-09-09  3:12 ` Eric Abrahamsen
2019-09-09  4:33   ` Bob Newell
2019-09-09  7:48     ` Eric Abrahamsen
     [not found]     ` <87lfuxq57r.fsf@ericabrahamsen.net>
2019-09-09  7:50       ` Eric Abrahamsen [this message]
2019-09-09 20:11 ` Peter Münster
2019-09-09 21:30   ` Bob Newell
2019-09-09 21:49     ` Peter Münster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h85lq56f.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=bobnewell@bobnewell.net \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).