Skip to content

Commit

Permalink
Update docs and bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgaribay committed Mar 10, 2016
1 parent ac8458c commit 887346f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ A wrapper for SendGrid's API to create composable emails.
Add the following code to your dependencies in your **`mix.exs`** file:

```elixir
{:sendgrid, "~> 0.0.1"}
{:sendgrid, "~> 0.0.2"}
```

## Configuration
Expand Down Expand Up @@ -48,16 +48,21 @@ email =
|> Email.put_from("[email protected]")
|> Email.put_to("[email protected]")
|> Email.put_subject("Hello From Elixir")
|> Email.put_html("\<html\>\<body\>\<p>Sent from Elixir!\</p\>\</body\>\</html>\")
|> Email.put_html("<html><body><p>Sent from Elixir!</p></body></html>")

Mailer.send(email)
```

### Using a Predefined Template

```elixir
alias SendGrid.Email
alias SendGrid.{Mailer, Email}

Email.build()
email =
Email.build()
|> Email.put_template("the_template_id")
|> Email.add_substitution("-foo-", "bar")
|> Email.put_html("<span>Some Text</span>")

Mailer.send(email)
```
2 changes: 1 addition & 1 deletion lib/sendgrid_email.ex
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ defmodule SendGrid.Email do
end

@doc """
Deletes a single CC address from the email.
Deletes a single `CC` address from the email.
Email.delete_cc(%Email{cc:["[email protected]"]}, "[email protected]"))
%Email{cc:[]}
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule SendgridElixir.Mixfile do

def project do
[app: :sendgrid,
version: "0.0.1",
version: "0.0.2",
elixir: "~> 1.2",
package: package,
description: description,
Expand Down

0 comments on commit 887346f

Please sign in to comment.