Web service to send emails from Agent?

Sending SMS from Agents works great using the Twilio web service. How can I send emails from Agents?

http://www.mailgun.com/ is one option that has a limited free option.

Thanks, perfect!

…and here is the working Agent code (thanks again deldrid1):

function mailgun(emailFrom, emailTo, emailSubject, emailText) { const MAILGUN_URL = "https://api.mailgun.net/v2/me.mailgun.org/messages"; const MAILGUN_API_KEY = "key-your_api_key"; local auth = "Basic " + http.base64encode("api:"+MAILGUN_API_KEY); local text = http.urlencode({from=emailFrom, to=emailTo, subject=emailSubject, text=emailText}); local req = http.post(MAILGUN_URL, {Authorization=auth}, text); local res = req.sendsync(); if(res.statuscode != 200) { server.log("error sending email: "+res.body); } } mailgun("postmaster@me.mailgun.org", "me@yahoo.com", "Testing Mailgun", "Thank you deldrid1!");

Mandrill/Mailchimp is also good if you need a transactional mail API.