sendgrid v0.0.1 SendGrid.Mailer
Handles sending transactional email through SendGrid’s API.
Configuration
You must provide a configuration which includes your api_key
.
config :sendgrid,
api_key: "sendgrid_api_key"
Summary
Functions
Sends the built email
Functions
Specs
send(SendGrid.Email.t) ::
:ok |
{:error, [String.t]} |
{:error, String.t}
Sends the built email.
email =
Email.build()
|> Email.put_to("test@email.com")
|> Email.put_from("test2@email.com")
|> Email.put_subject("Hello from Elixir")
|> Email.put_text("Sent with Elixir")
:ok = Mailer.send(email)