From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/88753 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.gnus.general Subject: Re: Multiple Mailings Date: Mon, 09 Sep 2019 15:48:52 +0800 Message-ID: <87mufdq597.fsf@ericabrahamsen.net> References: <87d0gamwtn.fsf@bobnewell.net> <875zm2qi23.fsf@ericabrahamsen.net> <874l1mozpl.fsf@bobnewell.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="109194"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: ding@gnus.org To: Bob Newell Original-X-From: ding-owner+M36957@lists.math.uh.edu Mon Sep 09 10:15:13 2019 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from lists1.math.uh.edu ([129.7.128.208]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i7EpN-000SGp-Ha for ding-account@gmane.org; Mon, 09 Sep 2019 10:15:13 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.92) (envelope-from ) id 1i7Eoo-00065F-Pj; Mon, 09 Sep 2019 03:14:38 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by lists1.math.uh.edu with esmtps (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1i7Eok-00062a-AF for ding@lists.math.uh.edu; Mon, 09 Sep 2019 03:14:34 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1i7Eoh-0007jq-VN for ding@lists.math.uh.edu; Mon, 09 Sep 2019 03:14:34 -0500 Original-Received: from ericabrahamsen.net ([52.70.2.18] helo=mail.ericabrahamsen.net) by quimby.gnus.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i7Eod-0002dx-Tt for ding@gnus.org; Mon, 09 Sep 2019 10:14:30 +0200 Original-Received: from localhost (unknown [223.104.4.58]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 21872FA021; Mon, 9 Sep 2019 08:14:24 +0000 (UTC) In-Reply-To: <874l1mozpl.fsf@bobnewell.net> (Bob Newell's message of "Sun, 08 Sep 2019 18:33:58 -1000") List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:88753 Archived-At: 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...