Bamboo.SMTPAdapter Fork
A fork from adapter for the Bamboo SMTP email app. Provides migration to elixir 1.20 version. Points 3 and forward the informations still as original repository.
Installation
The package can be installed as:
-
Add
bamboo_smtpto your list of dependencies inmix.exs:def deps do[{:krug_bamboo_smtp, "~> 5.0.1"}]end -
Add
:bambooand:krug_bamboo_smtpto your list of applications inmix.exs:def application do[applications: [:bamboo, :krug_bamboo_smtp]]end -
Setup your SMTP configuration:
# In your config/config.exs fileconfig :my_app, MyApp.Mailer,adapter: Bamboo.SMTPAdapter,server: "smtp.domain",hostname: "your.domain",port: 1025,username: "your.name@your.domain", # or {:system, "SMTP_USERNAME"}password: "pa55word", # or {:system, "SMTP_PASSWORD"}tls: :if_available, # can be `:always` or `:never`allowed_tls_versions: [:"tlsv1", :"tlsv1.1", :"tlsv1.2"], # or {:system, "ALLOWED_TLS_VERSIONS"} w/ comma separated values (e.g. "tlsv1.1,tlsv1.2")tls_log_level: :error,tls_verify: :verify_peer, # optional, can be `:verify_peer` or `:verify_none`tls_cacertfile: "/somewhere/on/disk", # optional, path to the ca truststoretls_cacerts: "…", # optional, DER-encoded trusted certificatestls_depth: 3, # optional, tls certificate chain depthtls_verify_fun: {&:ssl_verify_hostname.verify_fun/3, check_hostname: "example.com"}, # optional, tls verification functionssl: false, # can be `true`retries: 1,no_mx_lookups: false, # can be `true`auth: :if_available # can be `:always`. If your smtp relay requires authentication set it to `:always`.Sensitive credentials should not be committed to source control and are best kept in environment variables. Using
{:system, "ENV_NAME"}configuration is read from the named environment variable at runtime.The hostname option sets the FQDN to the header of your emails, its optional, but if you don't set it, the underlying
gen_smtpmodule will use the hostname of your machine, likelocalhost. -
Follow Bamboo Getting Started Guide
-
Optional Set
BambooSMTP.TestAdapteras your test adapter:# In your config/config.exs fileif Mix.env() == :test doconfig :my_app, MyApp.Mailer, adapter: MyApp.SMTPTestAdapterend
Usage
You can find more information about advanced features in the Wiki.
Code of Conduct
By participating in this project, you agree to abide by its [CODE OF CONDUCT] CODE_OF_CONDUCT.md
Contributing
You can see the specific [CONTRIBUTING] CONTRIBUTING.md guide.
License
Bamboo SMTPAdapter is released under The MIT License (MIT).