[comp.emacs] mail-send bug

maechler@CRYPTO.BELLCORE.COM (Martin Maechler) (06/06/91)

(In Emacs 18.57, SPARCstation 1+, SunOS 4.1.1)
By accident, I had 
	-------------------
	mTo: <legal address>
instead of
	To: <legal address>

No piece of software ever complained, but the mail was never delivered.
I only was able to find out, because the mail was still FCC: into my
"outbox" file.

Wouldn't it be easy for mail-send to make sure that mail is really going out?
(And then, some mailer deamons are still responsible for mail with wrong
addresses !)

One way may be also to "regexp" check the mail header.
Who does the patch ?

Martin Maechler, Bellcore 2M-343, 445 South St., Morristown, NJ 07962-1910, USA
maechler@bellcore.com, Tel: (201) 829-4837(w)  933-0944(h), Fax (201) 538-9093.

Dan_Jacobson@ATT.COM (06/06/91)

>>>>> "Martin" == Martin Maechler <maechler@bellcore.com> writes:

Martin> (In Emacs 18.57, SPARCstation 1+, SunOS 4.1.1)
Martin> By accident, I had 
Martin> 	-------------------
Martin> 	mTo: <legal address>
Martin> instead of
Martin> 	To: <legal address>

Martin> No piece of software ever complained, but the mail was never delivered.
Martin> I only was able to find out, because the mail was still FCC: into my
Martin> "outbox" file.

Martin> Wouldn't it be easy for mail-send to make sure that mail is
Martin> really going out?  (And then, some mailer deamons are still
Martin> responsible for mail with wrong addresses !)

Martin> One way may be also to "regexp" check the mail header.
Martin> Who does the patch ?

w.j.carpenter@att.com's feedmail.el stops that problem for me with
"Sending...abandoned, no addressees!"

furthermore,

feedmail-last-chance-hook's value is feedmail-confirm-addresses-hook-example

Documentation:
*User's last opportunity to modify the message on its way out.  It
has already had all the header prepping from the standard package.
The next step after running the hook will be to push the buffer into a
subprocess that mails the mail.  The hook might be interested in these
buffers:  (1) feedmail-prepped-text-buffer contains the header and body
of the message, ready to go;  (2) feedmail-address-buffer contains the
space-separated, simplified list of addresses which is to be given to
the subprocess (the hook may change them).  feedmail-error-buffer is
an empty buffer intended to soak up errors for display to the user.
If the hook allows interactive activity, the user should not send more
mail while in the hook since some of the internal buffers will be reused.

feedmail-confirm-addresses-hook-example:
An example of a last chance hook that shows the simple addresses
and gets a confirmation.  Use as (setq feedmail-last-chance-hook
'feedmail-confirm-addresses-hook-example).

etc.

so even with some valid other addresses, you could spot that it was
going to send to a smaller list than intended.  Sometimes I send to
only a BCC list, so I still think it's right if it doesn't find a To:
line... you could always do more checking in these optional hooks.

feedmail.el can hand mail to sendmail, or /bin/mail, etc. and also
eliminates the need for fakemail.c in the Emacs sources.

Anyways, Bill still hasn't got feedmail.el into the Ohio-State Lisp
Archive it seems, so you might pester him at w.j.carpenter@att.com for
it... he did recently post it in gnu.emacs.sources, though it didn't
make it out to my machine at least, at that time.