There might be existing uses of `net/sendmail' that did this quoting
since this code didn't do so. Such uses would continue to work fine,
since quoted strings would already be plain ASCII, so a second quoting
would leave it as is.
Note that the quoted strings are also used as command line arguments.
It seems that sendmail deals with these all fine when they appear as
command line arguments. This means that any valid email address format
can be used, not just "raw" emails. If there are some sendmails that
don't do this, then it would be better to add a `-t' flag to let
sendmail parse the text in the message.
One caveat (not a new one): since they're passed as is, it is possible
to use two emails in a single string, as in "a@b.com, c@d.com". This
could lead to obvious problems if someone uses "Bar, Foo <foo@bar.org>"
instead of "\"Bar, Foo\" <foo@bar.org>". (Using a `-t' to parse the
content won't help with that...) The only way to avoid this would be to
parse the emails and quote the name part if needed. But that's a much
hairier piece of code.
* Move the `X-Mailer' header to the top, so that the interesting headers
are all together at the bottom (the top gets littered by server
headers anyway).
* Use `subprocess' directly (`process*' wasn't really doing anything
more than that).
* Allow the sender to be `#f', leaving the header out. This makes all
sendmails that I've used use the username that is running the process.
* Just search for a sendmail program: don't barf on windows, so it can
be used in case there is a sendmail.exe executable there.
* Remove `no-mail-recipients' to make it in-line with other racket code
that doesn't raise super-specific exceptions.
* Use port counting instead of doing the counts manually, much simpler
code.