Better Email plugin (Beta) Discussion
- FlyingDiver
- Posts: 7830
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Better Email plugin (Beta) Discussion
The limitations in email handling in Indigo finally annoyed me enough to do something about it. This plugin allows creation of three devices, each representing an email type server. There's one for IMAP servers, one for POP servers, and one for SMTP servers. The IMAP and POP devices have triggers for email received. There's several states exposed for this, but if you want to use both subject and message body in your conditionals, trigger on the "lastMessage" state as it's the last one updated. I would use Conditionals to look for specific strings in the state fields rather than trying to do an exact match in the Trigger.
The SMTP device allows you to set up a specific email server/account to send mail "From". It has one action available, which sends an email. The advantage here is that you can define multiple SMTP devices, with different SMTP credentials and different "From" addresses. Also, variable substitution is enabled in the message subject and body.
Error handling is still pretty spotty, and you'll probably need to run it in debug mode all the time to get any useful feedback on it.
https://dl.dropboxusercontent.com/u/756 ... Plugin.zip
Feedback in this thread please.
joe
The SMTP device allows you to set up a specific email server/account to send mail "From". It has one action available, which sends an email. The advantage here is that you can define multiple SMTP devices, with different SMTP credentials and different "From" addresses. Also, variable substitution is enabled in the message subject and body.
Error handling is still pretty spotty, and you'll probably need to run it in debug mode all the time to get any useful feedback on it.
https://dl.dropboxusercontent.com/u/756 ... Plugin.zip
Feedback in this thread please.
joe
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
- jay (support)
- Site Admin
- Posts: 19232
- Joined: Wed Mar 19, 2008 11:52 am
- Location: Austin, Texas
- Contact:
Re: Better Email plugin (Beta)
LOL - necessity is the mother of invention! Thanks for the contribution. Once you're out of beta, I highly recommend that you add it to the Contribution Library since dropbox/other download links have a tendency to go stale after a while.
- SpencerJRoberts
- Posts: 256
- Joined: Sun Dec 09, 2012 12:07 pm
- Location: Mountain View, CA
Re: Better Email plugin (Beta)
Fantastic!
I use Find My Friends to do presence tracking for two members of my house and the apple Mail app has been extremely unreliable over the last few weeks. This looks like it might solve my problem! I'll give it a shot soon and let you know how it goes.
I use Find My Friends to do presence tracking for two members of my house and the apple Mail app has been extremely unreliable over the last few weeks. This looks like it might solve my problem! I'll give it a shot soon and let you know how it goes.
- FlyingDiver
- Posts: 7830
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Re: Better Email plugin (Beta)
New version posted above. Stupid error in SMTP device.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
- matt (support)
- Site Admin
- Posts: 21542
- Joined: Mon Jan 27, 2003 1:17 pm
- Location: Texas
- Contact:
- FlyingDiver
- Posts: 7830
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Re: Better Email plugin (Beta)
Plugin is scriptable:
Code: Select all
betterEmail = "com.flyingdiver.indigoplugin.betteremail"
bePlugin = indigo.server.getPlugin(betterEmail)
if bePlugin.isEnabled():
bePlugin.executeAction("sendEmail", deviceId=XXXXXXX,
props={'emailTo':'[email protected]', 'emailSubject':'Subject, of course', 'emailMessage':'Put something interesting here.'})
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
Re: Better Email plugin (Beta)
Enjoying the plugin - thank you!
I do have a dumb question: How do you use the message substitution in the subject field?
JP
I do have a dumb question: How do you use the message substitution in the subject field?
JP
- FlyingDiver
- Posts: 7830
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Re: Better Email plugin (Beta)
Syntax is %%v:XXXX%% to substitute in the value of a variable, or %%d:XXX:stateName%% for a state value of a device.roquej wrote:Enjoying the plugin - thank you!
I do have a dumb question: How do you use the message substitution in the subject field?
JP
For instance, if you're doing a security alert, use a server action to set a variable to the name of the zone. If the ID number of the variable is 12345678, then the Subject might be:
"Security Alert for zone: %%v:12345678%%".
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
Re: Better Email plugin (Beta)
Thank you
- FlyingDiver
- Posts: 7830
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Re: Better Email plugin (Beta)
Right now I'm working on code to queue up any outgoing email message so that if the server isn't responding or there's some other configuration issue, they'll stay queued until it gets fixed. I'm also adding an action to clear the queue.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
Re: Better Email plugin (Beta)
Way cool idea.... Welcome to the world of developing
Mike
Mike
- FlyingDiver
- Posts: 7830
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Re: Better Email plugin (Beta)
I've been a software developer for over 30 years. This is just my first Indigo plugin.Chameleon wrote:Way cool idea.... Welcome to the world of developing![]()
Mike
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
Re: Better Email plugin (Beta)
Very cool. Any chance of extending it to include iMessage notifications?
Sent from my iPad using Tapatalk
Sent from my iPad using Tapatalk
Insteon / Z-Wave / Bryant Evolution Connex /Tesla / Roomba / Elk M1 / SiteSage / Enphase Enlighten / NOAA Alerts
- FlyingDiver
- Posts: 7830
- Joined: Sat Jun 07, 2014 10:36 am
- Location: Southwest Florida, USA
Re: Better Email plugin (Beta)
That would have to be a totally separate Plugin. Can't you do iMessage notifications with the Growl plugin?Bollar wrote:Very cool. Any chance of extending it to include iMessage notifications?
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
Re: Better Email plugin (Beta)
I can do iMessage notifications with a short AppleScript, but your plugin is more powerful and easier.
Sent from my iPad using Tapatalk
Sent from my iPad using Tapatalk
Insteon / Z-Wave / Bryant Evolution Connex /Tesla / Roomba / Elk M1 / SiteSage / Enphase Enlighten / NOAA Alerts
