BambooSMTP.TestAdapter (Bamboo SMTP Adapter v4.2.2) View Source
Based on Bamboo.TestAdapter
, this module can be used for testing email delivery.
The deliver/2
function will provide a response that follow the format of a SMTP server raw response.
No emails are sent, instead it sends back {%Bamboo.Email{...}, {:ok,"<raw_smtp_response>"}}
for success and raise an exception on error.
Example config
# Typically done in config/test.exs
config :my_app, MyApp.Mailer,
adapter: BambooSMTP.TestAdapter
# Define a Mailer. Typically in lib/my_app/mailer.ex
defmodule MyApp.Mailer do
use Bamboo.Mailer, otp_app: :my_app
end
Link to this section Summary
Functions
Callback implementation for Bamboo.Adapter.handle_config/1
.
Link to this section Functions
Callback implementation for Bamboo.Adapter.handle_config/1
.