Closed Ecno92 closed 1 year ago
Thanks for the report. Yes, this seems to be a bug in AnymailInboundMessage.construct()
: when called with an empty string to
or cc
param, it results in a message with an empty-string To or Cc header. The correct behavior would be to have no To or Cc header in those cases. The problem doesn't become apparent until you try to access those values using AnymailInboundMessage.to
or .cc
, at which point the invalid empty header is detected.
Postmark seems to be the only ESP using the to
and cc
params to AnymailInboundMessage.construct()
.
When a postmark Cc email address is empty we can not loop over the result without getting an exception.
Below you can find an minimal example using parts of the codebase:
I would expect that
.cc
is set to[]
in case no cc email address is set on the incoming message. Is this indeed a bug or are my expectations not correct? Also I would not expect that parsing errors occur after the parsing procedure.Let me know what you think.