Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# esendgrid
An Erlang library for sending e-mails via SendGrid [Web API v2]
(https://sendgrid.com/docs/API_Reference/Web_API/mail.html)

Installing
----------

In rebar.config:

```Erlang
{esendgrid, ".*", {git, "https://github.com/kato-im/sendgrid-erlang.git", {tag, "master"}}}
```

In sys.config:

```Erlang
{esendgrid, [
{sendgrid_api_user, <<"your-api-user">>},
{sendgrid_api_key, <<"your-api-key">>}
]}
```

Usage
-----

```Erlang
esendgrid:send_email([ {<<"to">>, <<"to@domain.com">>}
, {<<"from">>, <<"from@domain.com">>}
, {<<"subject">>, <<"Subject message">>}
, {<<"text">>, <<"Your body message here">>}
, {<<"html">>, <<"Or you could also add some html here instead of text">>}
]).
```
3 changes: 2 additions & 1 deletion src/esendgrid.app.src
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
{registered, []},
{applications, [
kernel,
stdlib
stdlib,
lhttpc
]},
{mod, { esendgrid_app, []}},
{env, []}
Expand Down