Closed rohfosho closed 5 years ago
When you leave out send_at, attachments, content, or reply_to, the mailer errors out with
send_at
attachments
content
reply_to
{:error, [%{"field" => "attachments", "help" => "http://sendgrid.com/docs/API_Reference/Web_API_v3/Mail/errors.html#message.attachments", "message" => "Invalid type. Expected: array, given: null."}, %{"field" => "content", "help" => "http://sendgrid.com/docs/API_Reference/Web_API_v3/Mail/errors.html#message.content", "message" => "Invalid type. Expected: array, given: null."}, %{"field" => "send_at", "help" => "http://sendgrid.com/docs/API_Reference/Web_API_v3/Mail/errors.html#message.send_at", "message" => "Invalid type. Expected: integer, given: null."}, %{"field" => "reply_to", "help" => "http://sendgrid.com/docs/API_Reference/Web_API_v3/Mail/errors.html#message.reply_to", "message" => "Invalid type. Expected: object, given: null."}]}
Just kidding. It turns out custom args can't have an integer. The library should automatically convert all integers in the Email struct to strings to prevent this from happening.
When you leave out
send_at
,attachments
,content
, orreply_to
, the mailer errors out with