Sending email

Any ideas or examples of sending an email from an agent. I have a project that the IMP is being used on that is replacing an arduino and ethernet shield. The old email client was simple SMTP HELO…

I was using an SMTP server via go daddy that is also hosting another webpage. I am very use to SMTP, not so familiar with what is available via REST or other HTTP apis.

BTW, love the new agent/device layout. Add a backup/save/revert or some level of source control would be really nice.


You can’t send an email directly from an imp or an agent, however there are lots of APIs our there to send emails for you, which would be the Electric Imp Approach."

MailGun lets you send up to 10,000 emails a month free of charge, which is likely more than you’ll need. I haven’t played with MailGun + Electric Imp, but it should be possible to get going.

Revert functionality for the IDE is in the pipeline :slight_smile:

…and probably Zapier and IFTTT?

Zapier should work, but IFTTT doesn’t have an HTTP Web Hook channel, so it’s really tricky to use with Electric Imp (although if you search the forums for IFTTT, you’ll find an option or two).

If you google “email REST api” you’ll get a TON of options!!

Just kicked something together fast :slight_smile:

This is for easily using mailgun with the Electric Imp

Awesome job @MikeyDK - thanks for knocking up an example!

Do you mind if we add your example code to our reference library (with proper attribution of course).

If you have a website, you can make your own email API, using PHP scripting.

Imp agent sends an email address or some sort of code, and the message. The PHP script takes those values and sends out the actual emails. PHP can be set-up to send emails to a preset list of addresses also. Perhaps the imp agent sends a series of codes that determines which address book will be used?

Of course, there is also SMS text messaging.

sendhub API is 500 per month limit (free).