Better Email plugin discussion thread

Posted on
Tue Aug 02, 2016 4:02 pm
spiv offline
Posts: 190
Joined: Jul 15, 2014

Re: Better Email plugin discussion thread

I'm getting this error in my Indigo log when running 1.2.13

Better Email Error Error: Move Permanently


Turning on debugging....

Better Email Debug GET /repos/FlyingDiver/BetterEmail/Releases/latest
Better Email Debug HTTP 301 Moved Permanently


Also, and more important, after about 24 hours or so, the plug-in stops working.
I'm using it with IMAP and and Gmail account.
After it stops working, if I reset it with Indigo command "Plugins > Better Email > Reload" it restarts and finds several pending emails and processes them.

This has happened several days in a row.

Any suggestions?

Posted on
Tue Aug 02, 2016 5:54 pm
FlyingDiver online
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Better Email plugin discussion thread

I changed the name of the repository on GitHub. That's causing the error.

Install this version manually: https://github.com/FlyingDiver/Indigo-B ... 1.2.14.zip

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Aug 15, 2016 8:09 am
MartyS offline
Posts: 86
Joined: May 06, 2008
Location: Charlotte, North Carolina

Re: Better Email plugin discussion thread

FlyingDiver wrote:
I'm trying to get a handle on how many people are using this plugin.


I'm using the plugin in my Indigo 5 setup. Yes, I know that Indigo 5 is "so last year" but the server hardware is paid for and still works great! :D I of course did have to tweak the plugin's code to work with this older version but it's a small price to pay.

The primary reasons for liking the plugin is that it supports variable substitution in its outgoing message fields. Secondarily is its ability to properly do STARTSSL with my SMTP server. Yep, all my HA-based messages are super secret. :lol:

/Marty

Posted on
Mon Aug 15, 2016 8:33 am
spiv offline
Posts: 190
Joined: Jul 15, 2014

Re: Better Email plugin discussion thread

spiv wrote:

Also, and more important, after about 24 hours or so, the plug-in stops working.
I'm using it with IMAP and and Gmail account.
After it stops working, if I reset it with Indigo command "Plugins > Better Email > Reload" it restarts and finds several pending emails and processes them.

This has happened several days in a row.

Any suggestions?


Does anyone have an ideas on why this is happening?

I'd like to continue using this plug-in if I can resolve the reliability.

Compared to the built-in email support in Indigo I like that it supports IMAP and not simply POP and that with IMAP support, incoming email is detected faster than the built-in Indigo plug-in which polls for email at 1 minute (or longer) intervals.

Posted on
Mon Aug 15, 2016 8:56 am
FlyingDiver online
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Better Email plugin discussion thread

spiv wrote:
Also, and more important, after about 24 hours or so, the plug-in stops working.
I'm using it with IMAP and and Gmail account.
After it stops working, if I reset it with Indigo command "Plugins > Better Email > Reload" it restarts and finds several pending emails and processes them.

This has happened several days in a row.

Any suggestions?


Make sure you're running the latest version (see above).

Turn on debug logging. When it seems to stop working, force a poll (menu). Then post the log output (use CODE tags).

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Aug 15, 2016 10:31 am
spiv offline
Posts: 190
Joined: Jul 15, 2014

Re: Better Email plugin discussion thread

Code: Select all

***** I checked for the correct/updated version


Aug 15, 2016, 9:16:49 AM
  BetterEmail Debug               Plugin version detected: 1.2.14
  BetterEmail Debug               Current version is: 1.2.14
  BetterEmail Debug               Getting latest release from FlyingDiver/Indigo-BetterEmail...
  BetterEmail Debug               GET /repos/FlyingDiver/Indigo-BetterEmail/releases/latest
  BetterEmail Debug               HTTP 200 OK
  BetterEmail Debug               Latest release is: 1.2.14

****** With nothing happening, even after I activated the device trigger, I reloaded the plug-in


  Reloading plugin "BetterEmail 1.2.14"
  Stopping plugin "BetterEmail 1.2.14" (pid 764)
  BetterEmail Debug               Removing Trigger Better Email IOTbuttonDoublePress (1841385603)
  BetterEmail Debug               Removing Trigger Better Email IOTbuttonLongPress (429389513)
  BetterEmail Debug               Removing Trigger Better Email IOTbuttonSinglePress (1152249399)
  BetterEmail Debug               Stopping server: IOTbutton01@gmail.com
  BetterEmail                     Shutting down Better Email
  Stopped plugin "BetterEmail 1.2.14"
  Starting plugin "BetterEmail 1.2.14" (pid 18800)
  BetterEmail Debug               Debugging enabled
  Started plugin "BetterEmail 1.2.14"
  BetterEmail                     Starting Better Email
  BetterEmail Debug               Plugin version detected: 1.2.14
  BetterEmail Debug               Current version is: 1.2.14
  BetterEmail Debug               Getting latest release from FlyingDiver/Indigo-BetterEmail...
  BetterEmail Debug               GET /repos/FlyingDiver/Indigo-BetterEmail/releases/latest
  BetterEmail Debug               HTTP 200 OK
  BetterEmail Debug               Latest release is: 1.2.14
  BetterEmail Debug               IOTbutton01@gmail.com: Device Current Version = 3
  BetterEmail Debug               IOTbutton01@gmail.com: Device Version is up to date
  BetterEmail Debug               Starting server: IOTbutton01@gmail.com
  BetterEmail Debug               IOTbutton01@gmail.com: Doing connect using encryptionType = SSL
  BetterEmail Debug               IOTbutton01@gmail.com: idle() called
  BetterEmail Debug               Adding Trigger Better Email IOTbuttonDoublePress (1841385603)
  BetterEmail Debug               Adding Trigger Better Email IOTbuttonLongPress (429389513)
  BetterEmail Debug               Adding Trigger Better Email IOTbuttonSinglePress (1152249399)


***** I forced the plug-in to poll, nothing happened

Aug 15, 2016, 9:19:58 AM
  BetterEmail Debug               Polling All Email Servers
  BetterEmail Debug               Polling serverId: 664960021, serverTypeId: imapAccount(IOTbutton01@gmail.com)
  BetterEmail Debug               Skipping IMAP Server using IDLE: IOTbutton01@gmail.com


***** I had the plug-in clear existing messages - seems to do something, but......

Aug 15, 2016, 9:20:27 AM
  BetterEmail Debug               Clearing all SMTP Queues


****** I activate the trigger device, and now, finally, the plug-in sees all the older pending emails (which should have been deleted) plus the new one...


Aug 15, 2016, 9:20:46 AM
  BetterEmail Debug               IOTbutton01@gmail.com: IDLE Event Received
  BetterEmail Debug               IOTbutton01@gmail.com: Doing checkMsgs
  BetterEmail Debug               IOTbutton01@gmail.com: msg_ids = ['1 2 3 4 5 6 7 8 9 10']
  BetterEmail Debug               IOTbutton01@gmail.com: Checking Message # 1
  BetterEmail Debug               IOTbutton01@gmail.com: Fetching Message # 1
  BetterEmail Debug               Received Message Subject: Hello from your IoT Button G030JF053347NAFM: SINGLE
  BetterEmail Debug               Received Message From: AWS Notifications <no-reply@sns.amazonaws.com>
  BetterEmail Debug               Received Message ID: <0101015680c70c4d-84140fcf-6bf3-4a8c-a66e-3e6dec84b560-000000@us-west-2.amazonses.com>
  BetterEmail Debug               Checking Triggers for Device IOTbutton01@gmail.com (664960021)
  BetterEmail Debug                  Checking Trigger Better Email IOTbuttonLongPress (429389513), regexMatch
  BetterEmail Debug                  Checking Device State messageSubject for Pattern: LONG
  BetterEmail Debug                  No Match for Trigger Better Email IOTbuttonLongPress (429389513)
  BetterEmail Debug                  Checking Trigger Better Email IOTbuttonSinglePress (1152249399), regexMatch
  BetterEmail Debug                  Checking Device State messageSubject for Pattern: SINGLE
  BetterEmail Debug                  Executing Trigger Better Email IOTbuttonSinglePress (1152249399), match: SINGLE
  Trigger                         Better Email IOTbuttonSinglePress
  BetterEmail Debug                  Checking Trigger Better Email IOTbuttonDoublePress (1841385603), regexMatch
  Action Collection               Better Email IOTbutton SINGLE received
  BetterEmail Debug                  Checking Device State messageSubject for Pattern: DOUBLE
  BetterEmail Debug                  No Match for Trigger Better Email IOTbuttonDoublePress (1841385603)
  BetterEmail Debug               Deleting message # 1
  Sent INSTEON                    "FamilyRoom Cylinder Lamps" off
  BetterEmail Debug               IOTbutton01@gmail.com: Checking Message # 2
  BetterEmail Debug               IOTbutton01@gmail.com: Fetching Message # 2
  BetterEmail Debug               Received Message Subject: Hello from your IoT Button G030JF053347NAFM: SINGLE
  BetterEmail Debug               Received Message From: AWS Notifications <no-reply@sns.amazonaws.com>
  BetterEmail Debug               Received Message ID: <0101015680ca73cb-f245d3ab-bb47-4a6f-b51c-a8bb7b27ce6c-000000@us-west-2.amazonses.com>
  BetterEmail Debug               Checking Triggers for Device IOTbutton01@gmail.com (664960021)
  BetterEmail Debug                  Checking Trigger Better Email IOTbuttonLongPress (429389513), regexMatch
  BetterEmail Debug                  Checking Device State messageSubject for Pattern: LONG
  BetterEmail Debug                  No Match for Trigger Better Email IOTbuttonLongPress (429389513)
  BetterEmail Debug                  Checking Trigger Better Email IOTbuttonSinglePress (1152249399), regexMatch
  BetterEmail Debug                  Checking Device State messageSubject for Pattern: SINGLE
  BetterEmail Debug                  Executing Trigger Better Email IOTbuttonSinglePress (1152249399), match: SINGLE
  Trigger                         Better Email IOTbuttonSinglePress
  BetterEmail Debug                  Checking Trigger Better Email IOTbuttonDoublePress (1841385603), regexMatch
  BetterEmail Debug                  Checking Device State messageSubject for Pattern: DOUBLE
  Action Collection               Better Email IOTbutton SINGLE received
  BetterEmail Debug                  No Match for Trigger Better Email IOTbuttonDoublePress (1841385603)
  BetterEmail Debug               Deleting message # 2
  Sent INSTEON                    "FamilyRoom Cylinder Lamps" off
 
 
   ****** etc. etc.  for the rest of the pending emails


Posted on
Mon Aug 15, 2016 10:52 am
FlyingDiver online
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Better Email plugin discussion thread

It's acting like Gmail isn't handling IDLE properly. Turn that off and set a fairly short poll time instead.

And you'll need to delete all the old emails by hand. The plugin won't delete a message it thinks it's already dealt with.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Aug 15, 2016 2:00 pm
spiv offline
Posts: 190
Joined: Jul 15, 2014

Re: Better Email plugin discussion thread

If I disable IDLE and enable polling, the shortest time allowed is 1 minute intervals. That is the same time as used by the Indigo built in POP email receiver.

I was using Better Email primarily because of the "near instant" response, rather than the support for smarter parsing or other email protocols.

Is there any other fix? Is there a free IMAP provider other than Google that is more reliable and trustworthy that anyone can recommend?

Posted on
Mon Aug 15, 2016 2:16 pm
FlyingDiver online
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Better Email plugin discussion thread

One of the problems is that Gmail isn't really IMAP. It's a proprietary server protocol that they attempt to make look like IMAP.

That said, was this previously working? If so, has anything changed that you know of?

You can get a free iCloud account from Apple that works correctly, as I recall. I figure Apple is more trustworthy than Google, at least when it comes to not data-mining your emails. YMMV.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Aug 15, 2016 2:34 pm
spiv offline
Posts: 190
Joined: Jul 15, 2014

Re: Better Email plugin discussion thread

Thanks for your help!

The Better Email plugin works with Gmail using IDLE, it just stops working after some long period of time, approx 24 to 48 hours, but I have not watched over it closely enough to tell you the exact duration.

For recommendation of alternative IMAP, I'm hoping someone that is using a mail provider with the Better Email plug-in can chime in. I should have been more specific - I am looking for feedback on possible alternative IMAP providers that are known to work flawlessly with this plug-in and IDLE. From that, I can choose the company/privacy policy/trustworthiness, etc. from my end.

Thanks again!

Posted on
Mon Aug 15, 2016 2:38 pm
FlyingDiver online
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Better Email plugin discussion thread

If that's the case, it's almost certain that Gmail is doing something weird on their end and shutting down the connection improperly.

What I would do is schedule an action that restarts the plugin every 24 hours, like this:

Code: Select all
plugin = indigo.server.getPlugin("com.flyingdiver.indigoplugin.betteremail")
if plugin.isEnabled():
   plugin.restart()


Or, you could disable and re-enable the Gmail IMAP device. I think that will probably also work.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sun Nov 13, 2016 6:19 pm
shapa offline
Posts: 483
Joined: Sep 08, 2014
Location: Swindon

Re: Better Email plugin discussion thread

Could not send any email...

" BetterEmail Error HighPerfPro SMTP: SMTP server connection error: character mapping must return integer, None or unicode"

Posted on
Sun Nov 13, 2016 8:19 pm
FlyingDiver online
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Better Email plugin discussion thread

shapa wrote:
Could not send any email...

" BetterEmail Error HighPerfPro SMTP: SMTP server connection error: character mapping must return integer, None or unicode"


Does your smtp server login or password include Unicode characters?



Sent from my iPad using Tapatalk

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Nov 14, 2016 1:29 am
shapa offline
Posts: 483
Joined: Sep 08, 2014
Location: Swindon

Re: Better Email plugin discussion thread

No, only latin, as well as some non-numeric ($, *, $, #)

Posted on
Mon Nov 14, 2016 1:39 am
shapa offline
Posts: 483
Joined: Sep 08, 2014
Location: Swindon

Re: Better Email plugin discussion thread

Tried alpha-numeric password with no success

From the server log:

07:37:27.808 4 SMTPI-187239([213.152.xx.xx]:31900) [78.40.149.16]:587 <- [213.152.xx.xx]:31900 incoming connection(highperf.pro)
07:37:27.808 5 SMTPI-187239([213.152.xx.xx]:31900) out: 220 highperf.pro ESMTP CommuniGate Pro is glad to see you!\r\n
07:37:28.463 5 SMTPI-187239([213.152.xx.xx]:31900) inp: ehlo macserver.local
07:37:28.463 5 SMTPI-187239([213.152.xx.xx]) out: 250-highperf.pro we trust you macserver.local\r\n250-DSN\r\n250-SIZE\r\n250-STARTTLS\r\n250-AUTH LOGIN PLAIN CRAM-MD5 DIGEST-MD5 GSSAPI MSN NTLM\r\n250-ETRN\r\n250-TURN\r\n250-ATRN\r\n250-NO-SOLICITING\r\n250-HELP\r\n250-PIPELINING\r\n250 EHLO\r\n
07:37:28.483 5 SMTPI-187239([213.152.xx.xx]) inp: STARTTLS
07:37:28.483 5 SMTPI-187239([213.152.xx.xx]) out: 220 please start a TLS connection\r\n
07:37:28.579 4 SMTPI-187239([213.152.xx.xx]) TLS-163859(DHE_AES256_SHA) connection accepted for DOMAIN(highperf.pro)
07:37:28.620 5 SMTPI-187239([213.152.xx.xx]) s-inp: ehlo macserver.local
07:37:28.620 5 SMTPI-187239([213.152.xx.xx]) s-out: 250-highperf.pro we trust you macserver.local\r\n250-DSN\r\n250-SIZE\r\n250-AUTH LOGIN PLAIN CRAM-MD5 DIGEST-MD5 GSSAPI MSN NTLM\r\n250-ETRN\r\n250-TURN\r\n250-ATRN\r\n250-NO-SOLICITING\r\n250-HELP\r\n250-PIPELINING\r\n250 EHLO\r\n
07:37:28.641 5 SMTPI-187239([213.152.xx.xx]) s-inp: AUTH CRAM-MD5
07:37:28.641 5 SMTPI-187239([213.152.xx.xx]) SASL-0(CRAM-MD5) out: <187239.1479109047@highperf.pro>
07:37:28.641 5 SMTPI-187239([213.152.xx.xx]) s-out: 334 PDE4NzIzOS4xNDc5MTA5MDQ3QGhpZ2hwZXJmLnBybz4=\r\n
07:37:28.662 3 SMTPI-187239([213.152.xx.xx]) read failed. Error Code=connection closed by peer
07:37:28.662 5 SMTPI-187239([213.152.xx.xx]) s-out: 535 SASL protocol has been interrupted\r\n
07:37:28.662 3 SMTPI-187239([213.152.xx.xx]) read failed. Error Code=connection closed by peer
07:37:28.662 4 SMTPI-187239([213.152.xx.xx]) TLS connection is closing
07:37:28.662 4 SMTPI-187239([213.152.xx.xx]) closing connection
07:37:28.662 4 SMTPI-187239([213.152.xx.xx]) releasing stream

Who is online

Users browsing this forum: No registered users and 1 guest