Added support for mail forwarding - recipients can now override to, cc, and bcc #52
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
MOTIVATION
Sometimes, for example when expanding a mailing list address and forwarding a mail to each member, it is useful to be able to override what's given in
:to
,:cc
, and:bcc
by explicitly setting which recipients should get the forwarded mail. It is however important that the original mail headers remain intact so that the recipients see who received the original mail and is able to reply (to all).HOW TO USE IT
You can now specify
:recipients
. If given, the mail will be sent to them instead to those given in:to
,:cc
, and:bcc
:CHANGES
The most effective way to implement this was to change
make-jmessage
to do the job. This function was renamed tomake-jmessage-with-recipients
and now returns a map:The recipients are either those given in
:recipients
, if any, or those given in:to
,:cc
, and:bcc
.The function
recipients
was removed.I also added functions
smtp-send-single*
andsmtp-connect*
in order to write tests.