Setting `from` and `reply_to` to `nil` or `''` causes 400 Bad Request
boardfish opened this issue · comments
Simon Fish commented
In order to use the sender defined within a Mailjet template, I'm trying to pass a blank From
and ReplyTo
parameter. When I pass the email as ''
, the parameters to the request are set to "ReplyTo"=>{"Email"=>nil}, "From"=>{"Email"=>nil}
. The API then returns a 400 Bad Request status code.
Simon Fish commented
I've set default_from
to ''
against the Mailjet config. Setting the from
and reply_to
to nil
at every other level (i.e. also in Devise config if necessary) meant it cascaded all the way back to default_from
and used a blank sender.