ElasticEmail
Basic Elixir wrapper for ElasticEmail API
Right now wrapper supports only Email functions.</br> Be free to extend this list.
Official API Documentation
Installation
If available in Hex, the package can be installed
by adding elasticemail to your list of dependencies in mix.exs:
def deps do
[
{:elasticemail, "~> 0.1.0"}
]
endConfiguration
Usage
Define API key
Application.put_env(:elasticemail, :api_key, "your apikey")Call Email function with arguments
Send Email
ElasticEmail.Email.send([to: "user@email.com", subject: "Test from Elixir", body_html: "<b>Some html text here</b>", from: "admin@email.com"])
Returns
{:ok,
%{messageid: "_oPCSHFxxx",
transactionid: "440dx-e81b-8144-e07b-xxx"}}Get Email status
ElasticEmail.Email.getstatus([transactionID: "xxx"])Returns
{:ok,
%{date: "2018-01-23T21:46:34", dateclicked: nil,
dateopened: "2018-01-23T21:46:52", datesent: "2018-01-23T21:46:49",
errormessage: "", from: "admin@email.com", status: 6,
statuschangedate: "2018-01-23T21:46:55", statusname: "Opened",
to: "user@email.com",
transactionid: "440dx-e81b-8144-e07b-xxx"}}Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/manme/elasticemail. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
Documentation
Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/elasticemail.