Return the reply because it may contain useful information for logging
and tracking. In particular, Amazon SES insists on assigning a new
Message ID rather than trusting the one we send them, and they return
the assigned Message ID in the reply, after "250 Ok".
Only do this when smtp-send is called with a single message. (This
is the common use case, which is documented and supported by
postal.core.)
If someone manages to call smtp-send with multiple messages, then
return a response without the server replies, as before. (The
alternative, which is to complicate the response from smtp-send to
incorporate multiple replies while remaining backwards compatible,
does not seem worth it---especially because sending multiple messages
at a time is not something you should do if you care to know which
ones succeeded.)
Return the reply because it may contain useful information for logging and tracking. In particular, Amazon SES insists on assigning a new Message ID rather than trusting the one we send them, and they return the assigned Message ID in the reply, after "250 Ok".
Only do this when
smtp-send
is called with a single message. (This is the common use case, which is documented and supported by postal.core.)If someone manages to call
smtp-send
with multiple messages, then return a response without the server replies, as before. (The alternative, which is to complicate the response fromsmtp-send
to incorporate multiple replies while remaining backwards compatible, does not seem worth it---especially because sending multiple messages at a time is not something you should do if you care to know which ones succeeded.)