- Regression in v0.25.3
Swoosh.Adapters.Local.Storage.Memory
start logic (thanks @wojtekmach)
- Accept
provider_options
:options
for SparkPost (thanks @florish)
- Guard
subject
in SMTP, raise when it's not a binary- this replaces the cryptic error message from
:mimemail
with a clearer one
- this replaces the cryptic error message from
deliver_many
with Mailjet implementation (thanks @panmichal)
- Support for tags in Postmark (thanks @millacas)
- TestAssertion: assert email sent in tasks
- Mailjet: handle multiple
to
response
- Allow empty content in Sendgrid for template users
- Custom variable encoding for Mailgun
:custom_id
Mailjet provider option:template_name
Mailgun provider option
Attachment.new
spec
- Mailjet Adapter now supports
TemplateErrorDeliver
andTemplateErrorReporting
- Prevent causing problems in multi node setup by allowing
Swoosh.Adapters.Local.Storage.Memory
to be disabled with config flag
- Support mailchimp merge language option (#391, thanks! @Deepwalker)
- "Clint Barton" @jc00ke's "most important OSS contribution ever" (#393)
- Link to Mailjet in README
- Local mailbox now displays a Sent At
- Local mailbox now has a title
- Mailjet Adapter (#367, thanks! @panmichal and @denispeplin)
- Allows
:never
as an options to SMTPauth
configuration
- Sparkpost attachment regression (#359, thanks! @LostKobrakai)
- Warnings for missing optional deps (mainly
Mail
added in Gmail Adapter PR) (#356)
- Gmail Adapter (#342, thanks! @mpran)
- Option to change encoding for SMTP Adapter (#341, thanks! @ivan-kolmychek)
- callback definition for
validate_config
andvalidate_dependency
on Adapter behaviour
- Use
plug_cowboy
instead ofplug
to work with both Cowboy 1 and 2
- SocketLabs Adapter (#320, thanks! @mpran)
- You can now pass options to
hackney
by settingprivate: %{hackney_options: [...]}
in%Email{}
(#327)
Swoosh.Adapters.Local.Storage.Memory
is now started as a global process- so when using
LocalAdapter
and testing muli-node setup, you can preview emails from all nodes - (#321, thanks! @jhchen)
- so when using
- Support
mail_settings
for sendgrid adapter (#291, thanks! @rhnonose)- which enables
sandbox_mode
- which enables
- Support for SparkPost templates (#292, thanks! @kamilbielawski)
- New clasue for
Attachment.new/2
to support taking in in-memory dataAttachment.new({:data, data_in_memory}, opts)
- Fixed Mailgun Adapter not supporting attachments with in-memory data
- Support for AWS SES tags (#283, thanks! @OpakAlex)
- Sendgrid adapter now supports
dynamic_template_data
(#276, thanks! @gnimona) - Multiple improvements for TestAssertions (#277, thanks! @13k for the execellent effort)
- added
assert_email_sent/0
that asserts any email was sent - added
refute_email_sent/0
(macro) that asserts no email was sent ("alias" of assert_no_email_sent/0) - added
refute_email_sent/1
(macro) that supports pattern matching
- added
- Decode SendGrid adapter 4xx response (#266, thanks! @jackmarchant)
- Fix clear button path when base_path is set (#271, thanks! @jhchen)
- Support for Mailgun tags (#256, thanks! @DavidOliver)
- Allow cowboy2 in dependency (#260, thanks! @hl)
- Expose Attachments in Mailbox Preview (#245, thanks! @maennchen)
- Switchig from listing
applications
toextra_applications
- less error-prone
- fix
:jason
application not available in releases
- SMTP Adapter now accepts
:no_mx_lookups
option (#203, thanks @sergioaugrod) - Support of metadata for Mandrill (#208, thanks @chubarovNick)
- Add SendGrid asm field (#221, thanks @nathf)
- Support regex match on html and text body in TestAssertion (#229, thanks @michallepicki)
- Support of template alias for Postmark (#232, thanks @sebastianseilund)
- Display provider_options in mailbox_viewer (#234, thank you @sebastianseilund again!)
- Poison -> Jason (Also making json library configurable, #214, #216)
- All modules are now defined regardless of whether their dependencies exist, warnings are suppressed via
xref: [exclude: [...]]
, compile time checks are put in place (#219)
> iex -S mix
Compiling 1 file (.ex)
06:02:24.569 [error] The following dependencies are required to use Swoosh.Adapters.SMTP:
- gen_smtp_client from :gen_smtp
- New Adapter Dyn (#188, thanks! @jann)
- Return message id from Sendgrid Adapter ([#189](swoosh#189, thanks! @felipesere)
- Support handling recipient variables in Mailgun Adapter (#194, thanks! @messutied)
- Fix date header formatting in Amazon SES adapter. (#190)
- Mandrill template and variable interpolation support (#172 - thanks and congrats on your first Elixir PR @sescobb27)
- Support optional attachment headers in SMTP related Adapters (#176 - thanks! @davec82)
- Support in-memory attachment (#178 - thanks again! @davec82, and #182)
- Dialyzer warnings (#180 thanks! @xadhoom)
- Alternative multipart email with attachment shows both text and html content (#184 thanks again! @xadhoom)
- Fix warning in Amazon SES adapter when
mimemail
dependency is not loaded. (#187)
- Inline attachment support in all adapters! (#159 - many thanks to @theodowling)
- Injected Mailer functions now come with typespecs (#158)
- Amazon SES Adapter! (#167 - great work by @jdollar, thank you!)
- SMTP configs are now checked and parsed to appropriate types if passed in as strings (#162)
- Mandrill Adapter error handling. (Detailed report in #168, fixed in #169)
- Add support for custom email headers in all adapters that were missing it: Postmark, Sendgrid, Mandrill and Sparkpost. (#155)
- Quote name portion of recipient in Mailgun adapter. (#150)
- Simplify
Swoosh.TestAssertions.assert_email_sent/1
(#139):- to cope with different AST in different Elixir versions
- to take advantage of ExUnit colored diffs
- Swoosh no longer reads config at compile time. (#146)
- Require
Elixir ~> 1.4
so that we can take advantage of all the OTP20 features. - Bump plug to 1.4.3.
- Bump hackney to 1.9.0.
- Warn when failing to start the preview server (#130)
- Support for mail headers in Mailgun adapter (#134)
- Allow adding attachments in Email.new (#135)
- Add support for attachments.
- Add support for categories in the Sendgrid adapter
- Add SparkPost adapter.
- The Sendgrid adapter now supports server-side templates and substitutions.
- Cowboy dependency was relaxed to ~> 1.0 (from ~> 1.0.0).
- Load Sendmail and SMTP.Helpers if :mimemail is loaded.
- Fix compiler warnings for Elixir 1.4.
- The Mailgun adapter now supports attaching data to emails.
- The Postmark adapter now supports using server-side templates.
- The Sendgrid adapter now uses the Sendgrid v3 API.
gen_stmp
is now an optional dependency.- Drop HTTPoison in favor of hackney.
- Enlarge the message area in the preview Plug.
- Bump poison to 3.0.
- Bump plug to 1.2.
- The SMTP and Sendmail adapters now correctly set the
Bcc
header. - The Postmark adapter now respects the
From
name. - Replace
:crypt.rand_bytes/1
by:crypto.strong_rand_bytes/1
since it was deprecated with OTP 19.
This version contains a couple of breaking changes, mostly due to the introduction of a deliver!/2
(see below):
- API-based adapter will now return a slightly different error payload:
{:error, {status_code, payload}}
instead of{:error, body}
deliver/2
will no longer raise if the email validation failed.- We now only validate that the
From
address is present, according to the RFC 5322. This is the lowest common deminotar across all our adapters. This means we will NO longer check that a recipient is present (to
,cc
,bcc
), that the subject is set, or that either ofhtml_body
ortext_body
is set.
- Add Sendmail adapter.
- Add a new
deliver!/2
function that will raise in case of an API or SMTP error, or if the email validation failed. In that case aSwoosh.DeliveryError
will be raised. - Add Logger adapter. This can be useful when you don't want to send real emails but still want to know that the email has been sent sucessfully.
- Add DKIM support for the SMTP and Sendmail adapter.
- Add basic integration testing. We are now making real calls to the various providers' API during testing (except Mandrill).
- Raise on missing adapter config.
- Refactor
Swoosh.Adapters.Local
to support configurable storage drivers. For now, only memory storage has been implemented. - Generate case-insentitive Message-IDs in
Swoosh.Adapters.Local.Storage.Memory
. This was previously breaking endpoint with lowercase path rewrite. - Move email validation logic to base mailer. We also change the validation to follow the RFC and we now only check that
a
From
email address is set. - Bump gen_smtp to 0.11.0.
- Show the actual port
Plug.Swoosh.MailboxPreview
is binding on. - Add poison to the list of applications in the
mix.exs
file. - Handle 401 response for Mailgun properly. It's a text response so we don't try to JSON decode it anymore.
Swoosh.InMemoryMailbox
has been removed in favor ofSwoosh.Adapters.Local.Storage.Memory
. If you were using that module directly you will need to update any reference to it.
- Add
Swoosh.Email.new/1
function to createSwoosh.Email{}
struct. Swoosh.TestAssertions.assert_email_sent/1
now supports asserting on specific email params.
- Remove the need for
/
when setting the Mailgun adapter domain config. Plug.Swoosh.MailboxPreview
now formats email fields in a more friendlier way.
- Use the sender's name in the
From
header with the Mailgun adapter. - Send custom headers set in
%Swoosh.Email{}.headers
when using the SMTP adapter. - Use the "Sender" header before the "From" header as the "MAIL FROM" when using the SMTP adapter.
- Add support for runtime configuration using
{:system, "ENV_VAR"}
tuples - Add support for passing config as an argument to deliver/2
- Adapters have consistent successful return value (
{:ok, term}
) - Only compile
Plug.Swoosh.MailboxPreview
ifPlug
is loaded - Relax Poison version requirement (
~> 1.5 or ~> 2.0
)
- Remove
cowboy
andplug
from the list of applications as they are optional dependencies
- Initial version