Page 3 of 8

Re: Better Email Q&A

PostPosted: Mon Dec 05, 2016 10:04 pm
by ChopOMatic
Thx, Joe!

Re: Better Email Q&A

PostPosted: Fri Dec 30, 2016 12:33 pm
by kennybroh
I have a gmail account I use strictly to send and receive emails used as triggers, such as geofencing notifications that I'm coming home, motion detected by a camera, etc. Triggers check the subject line, and make something happen. Was not happy that wasn't working.

Was having gmail scan authentication errors; installed Better Email and problem solved!

Thanks so much

Re: Better Email Q&A

PostPosted: Fri Dec 30, 2016 12:36 pm
by FlyingDiver
Be aware that GMail has an issue that it drops the IMAP connection for no apparent reason. Other users are restarting the device on a regular schedule to avoid that.

Re: Better Email Q&A

PostPosted: Fri Dec 30, 2016 12:50 pm
by kennybroh
But if I'm only checking incoming mail from the pop server that shouldn't be an issue, correct?

Re: Better Email Q&A

PostPosted: Fri Dec 30, 2016 12:51 pm
by FlyingDiver
kennybroh wrote:
But if I'm only checking incoming mail from the pop server that shouldn't be an issue, correct?


No, it's only IMAP server devices using the IDLE option that have the issue. But if you do use IMAP/IDLE, the response time for reacting to an incoming email is seconds, not minutes. What's your poll interval for the POP server?

Re: Better Email Q&A

PostPosted: Fri Dec 30, 2016 12:52 pm
by kennybroh
1 minute

Re: Better Email Q&A

PostPosted: Fri Dec 30, 2016 12:53 pm
by kennybroh
For the kinds of things I'm using it for, I have not experienced any significant delay.

Re: Better Email Q&A

PostPosted: Tue Jan 17, 2017 11:22 am
by MeetKevin
Hi everyone,

How can I set a variable as the subject line of the email? I know this plug-in compares to the subject line to determine if a statement is true or false. So I'm wondering if I can use that subject line in a notification like this in Pushover.

E.G. Email comes in. "New Listing: 123 Main Street."

"New Listing" is my trigger phrase.

Then I modify "New Listing: 123 Main Street" as a variable value, which I can then output as a push notification.

Maybe something like:

indigo.variable.updateValue(321275956, "indigo.activePlugin.substitute(pluginAction.props["emailSubject"])"

Thanks so much!
Kevin


Sent from my iPhone using Tapatalk

Re: Better Email Q&A

PostPosted: Tue Jan 17, 2017 11:36 am
by FlyingDiver
Are you trying to do this in a Python script or in an Indigo Action? There's a Server Action named "Insert Device State into Variable". That's what you use to put the subject line into a variable. The device state you want is "messageSubject".

But instead of doing that, just use the BetterEmail device state "messageSubject" for the Pushover notification using the device state substitution, rather than variable substitution.

Re: Better Email Q&A

PostPosted: Tue Jan 17, 2017 3:12 pm
by MeetKevin
I was going to put this in an indigo action via the Pushover plugin. I'll try these notes -- Thanks so much!


Sent from my iPhone using Tapatalk

Re: Better Email Q&A

PostPosted: Tue Jan 17, 2017 3:16 pm
by FlyingDiver
MeetKevin wrote:
I was going to put this in an indigo action via the Pushover plugin. I'll try these notes -- Thanks so much!


Sent from my iPhone using Tapatalk


If you want to send a Pushover message triggered by an email message, you have to base the trigger on the email device state, then use a Pushover action from there. Maybe that's what you're trying to do already.

Re: Better Email Q&A

PostPosted: Tue Jan 17, 2017 3:18 pm
by MeetKevin
Yes that's it. Just need the email subject line to update a variable so I can use that data.

I think your previous will nail that.


Sent from my iPhone using Tapatalk

Re: Better Email Q&A

PostPosted: Tue Jan 17, 2017 3:19 pm
by FlyingDiver
MeetKevin wrote:
Yes that's it. Just need the email subject line to update a variable so I can use that data.

I think your previous will nail that.


Sent from my iPhone using Tapatalk


I'll say it again. If you need the email subject line in an action, you don't need to put it in a variable first.

Re: Better Email Q&A

PostPosted: Tue Jan 17, 2017 3:26 pm
by MeetKevin
Ah, see that goes to show that I have no idea what I'm doing. The email device state contains the subject-line information?


Sent from my iPhone using Tapatalk

Re: Better Email Q&A

PostPosted: Tue Jan 17, 2017 3:39 pm
by FlyingDiver
MeetKevin wrote:
Ah, see that goes to show that I have no idea what I'm doing. The email device state contains the subject-line information?


Exactly. Otherwise, how would you get it into the variable in the first place?