Krug.ElasticEmailSender (Krug v2.0.27) View Source
A module to simplify use of Bamboo SMTP mailing with the "Elastic Email" smtp provider.
Documentation at https://elasticemail.com
Link to this section Summary
Functions
Send mail over "Elastic Email" smtp provider. Don't uses config.exs file for configuration read. Uses following conventioned configurations
Link to this section Functions
Send mail over "Elastic Email" smtp provider. Don't uses config.exs file for configuration read. Uses following conventioned configurations:
[
adapter: Bamboo.SMTPAdapter,
chained_adapter: Bamboo.SMTPAdapter,
server: "",
port: 587,
username: "",
password: "",
api_key: "my_api_key",
tls: :always,
allowed_tls_versions: {:system, "ALLOWED_TLS_VERSIONS"},
ssl: false,
retries: 0,
no_mx_lookups: false,
auth: :always
]
Received configurations options will be merged in this above. Configurations specific for this smtp provider too.
Return true if call to smtp provider results without errors. However the mail can be not delivered for any reason, by example restrictions quotas.
iex > email_configuration = %{
sender_name: "Johannes Backend",
sender_email: "johannes@has.not.email",
sender_password: nil,
replay_to: "johannes_chief@johannesenterpriseserver.com"
}
iex > Krug.ElasticEmailSender.mail(email_configuration,"Lets Party","Party Tommorow at 18:30","any@any.com")
false
iex > email_configuration = %{
sender_name: "Johannes Backend",
sender_email: "johannes@has.not.email",
sender_password: "<johannes_password>",
replay_to: "johannes_chief@johannesenterpriseserver.com"
}
iex > Krug.ElasticEmailSender.mail(email_configuration,"Lets Party","Party Tommorow at 18:30","any@any.com")
true