-
Notifications
You must be signed in to change notification settings - Fork 6
russelldb/erlgmail
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
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 (http://21ccw.blogspot.com/2009/05/how-to-send-email-via-gmail-using.html) 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 make 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", ["[email protected]"], ["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>").
About
An OTP app that can be used by Web Apps to send email Via googlemail
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published