Sendgrid, like Mailgun, only passes BCC recipients as a parameter in the original JSON payload.
This PR adds code to prepend the recipients from the Sendgrid payload to the raw_email under the X-Original-To header.
References #38738.
Mandrill's Inbound API checks to see if a URL exists before it creates
the webhook. It sends a HEAD request, to which we now return a 200 OK
response to indicate that the route exists.
Now we can generate inbound API calls with ease on Mandrill, without
having to shuffle around tokens in production.
Fixes#37609.
* Add a way to deliver inbound emails by source
Great for testing when you get an eml file and can just paste it in.
* Test updates
* Fix tests
* Fix spacing
Expose the Mailgun SMTP recipient to Action Mailbox as X-Original-To, like Postfix.
Allows handling BCCed recipients who aren't listed in To/CC fields.
Allow passing a block to the create_inbound_email_from_mail and
receive_inbound_email_from_mail test helper methods.
When you wanted to test a multipart email -- for example, an email that
has both a plaintext part and an HTML part -- there wasn't a way to
easily build one without a pre-made fixture. By allowing you to pass a
block to these methods, we unlock the power of Mail.new to easily
create a variety of emails, from multi-part emails, to emails with
attachments, and beyond.