Skip to content


Subversion checkout URL

You can clone with
Download ZIP
An OTP app that can be used by Web Apps to send email Via googlemail
Erlang Shell
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
ebin added rebar.
src Uses old ssl until I can update for new ssl in R14A, added a start sc…
README Updated README to include send_html instructions.


Erlgmail is a knocked together OTP app that simplyfies sending email through googlemail. It is just a wrapper on the work by Benjamin Nortier in this ( blog post.

And it now supports sending HTML email thanks to davide.

To use:

The cfg file now allows "profiles". Also the app now follows OTP env config standards better. If you wish to start an erlgmail OTP application instance with a different config file simply start like:

erl -erlgmail config_file '"/absolute/location/of/config/file.cfg"'

Or edit the example erlgmail.cfg in the priv directory. 

There MUST be a profile named "default" or things won't work. The send API now accepts an optional "profile" parameter.
If no "profile" (an atom) is specified then "default" is assumed.

git clone
cd erlgmail
cd priv
vi erlgmail.cfg 
add your own google account information (and add default too list (useful for form mailer type stuff))
cd ebin (or put it in $ERL_LIBS)
erl -boot start_sasl -config $ERL_LIBS/erlgmail/sasl.config (or your own config)
or erl -boot start_sasl -config /path/to/SASL_CONF -erlgmail '"/abs/path/to/conf.cfg"'
1> ssl:start().
2> application:start(erlgmail).
3> erlgmail:send("Subject", "Message Body", [""], ["Mister To Who"]).
4> erlgmail:psend("Subject", "Message", myprofile_x).
5> erlgmail:send_html("Subject", "<h1>Big Hello!</h1><img src='trackyou.image'/><br/><strong>An HTML email</strong>").

Something went wrong with that request. Please try again.