A number of services have popped up lately for sending email from your web app via HTTP. Web developers know HTTP, and so enjoy the fact that they can send email this way. But they all cost money. What if you could do it yourself, for free?
So I created a Haraka plugin using Express which provides a REST API for sending emails using HTTP POST parameters to fill out the template.
It’s very simple, and could easily be extended. I’m using it from EC2 (with an Elastic IP – don’t use their normal dynamic IPs for this).
Here’s the code: https://gist.github.com/1924944. Templates should include email headers and are stored in config/mail_template, then you just POST to http://localhost:5000/SendEmail/example (if your template file is called “example”) with sender and recipient parameters encoded in the body of the request.
There’s no fancy statistics like there are for sendgrid and other such services, but you have full control and writing more plugins is as easy as pie!