flyingdiver / indigo-betteremail Goto Github PK
View Code? Open in Web Editor NEWPlugIn for Indigo home automation system. Email via SMTP, IMAP, and POP
PlugIn for Indigo home automation system. Email via SMTP, IMAP, and POP
I just discovered this after working with the enhancement. I have two IMAP devices, one for iCloud and one for NamesPro. NamesPro move to folder is "INBOX.Processed" (thank you again) and iCloud is only "Processed".
When incoming mail is being processed for both IMAP devices, the plugin is using "INBOX.Processed" for both. So the iCloud device is getting that error saying the mailbox doesn't exist, which of course it doesn't since it's looking for "INBOX.Processed" instead of "Processed".
Would it be possible to add a css file to the payload for HTML formatted messages? Here's the main usage case I have in mind:
Each day, I send an email with the plugin that contains any errors that were written to the Indigo log during the prior day. I would like to format of the text so that it doesn't wrap when rendered in Mail.app.
I'm not sure how hard this would be to implement. Thanks for considering.
EDIT: I have discovered that the plugin will pass in-line css, so this has become less urgent for me (not that it was that urgent before....
message_text = """
This is some text.
<h1 style="color:blue;">A Blue Heading</h1>
<p style="white-space:nowrap;"> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</p>
"""
Or other named folder, instead of purging messages immediately.
I realized that the plugin wasn't allowing a normal IMAP client function, moving messages to a "Trash" folder instead of deleting them immediately.
I have an issue when i receive a particular email i can't parse it using reg parsing as its HTML and yet if i forward a plain text it works. Any ideas on how I parse it?
Are there plans to update this plugin so it works with the newest version of Indigo?
Seeing this error each time better email map connects to imap.mail.me.com
Doing a quick web search there appears to be some underlying IMAP Python framework(s) that have the same issue and was patched.
For both my accounts, State column reads failure for incoming (gmail and icloud) after updating to latest driver. The smtp (outgoing) says success. I also turned on IDLE. I turned on the debug msg and have the following:
Not sure what is going on. Sorry for the problems.
Started plugin "Better Email 7.2.3"
Better Email Starting Better Email
Better Email Threaddebug Better Email Gmail incoming: Device Version is up to date
Better Email Debug Better Email Gmail incoming: Starting device (imapAccount)
Better Email Debug Better Email Gmail incoming: Creating IMAP Server
Better Email Debug Better Email Gmail incoming: Using IMAP IDLE
Better Email Debug Better Email Gmail incoming: Doing connect using encryptionType = SSL
Better Email Debug Better Email Gmail incoming: Doing login()
Better Email Debug Better Email Gmail incoming: Doing select("INBOX")
Better Email Threaddebug Better Email Gmail incoming: Mailbox list:
Better Email Threaddebug Better Email Gmail incoming: Mailbox: (\HasNoChildren) "/" "INBOX"
Better Email Threaddebug Better Email Gmail incoming: Mailbox: (\HasNoChildren) "/" "Notes"
Better Email Threaddebug Better Email Gmail incoming: Mailbox: (\HasNoChildren) "/" "Personal"
Better Email Threaddebug Better Email Gmail incoming: Mailbox: (\HasNoChildren) "/" "Receipts"
Better Email Threaddebug Better Email Gmail incoming: Mailbox: (\HasNoChildren) "/" "Travel"
Better Email Threaddebug Better Email Gmail incoming: Mailbox: (\HasNoChildren) "/" "Work"
Better Email Threaddebug Better Email Gmail incoming: Mailbox: (\HasChildren) "/" "[Airmail]"
Better Email Threaddebug Better Email Gmail incoming: Mailbox: (\HasNoChildren) "/" "[Airmail]/Done"
Better Email Threaddebug Better Email Gmail incoming: Mailbox: (\HasNoChildren) "/" "[Airmail]/Memo"
Better Email Threaddebug Better Email Gmail incoming: Mailbox: (\HasNoChildren) "/" "[Airmail]/Snooze"
Better Email Threaddebug Better Email Gmail incoming: Mailbox: (\HasNoChildren) "/" "[Airmail]/To Do"
Better Email Threaddebug Better Email Gmail incoming: Mailbox: (\HasChildren \Noselect) "/" "[Gmail]"
Better Email Threaddebug Better Email Gmail incoming: Mailbox: (\All \HasNoChildren) "/" "[Gmail]/All Mail"
Better Email Threaddebug Better Email Gmail incoming: Mailbox: (\Drafts \HasNoChildren) "/" "[Gmail]/Drafts"
Better Email Threaddebug Better Email Gmail incoming: Mailbox: (\HasNoChildren \Important) "/" "[Gmail]/Important"
Better Email Threaddebug Better Email Gmail incoming: Mailbox: (\HasNoChildren \Sent) "/" "[Gmail]/Sent Mail"
Better Email Threaddebug Better Email Gmail incoming: Mailbox: (\HasNoChildren \Junk) "/" "[Gmail]/Spam"
Better Email Threaddebug Better Email Gmail incoming: Mailbox: (\Flagged \HasNoChildren) "/" "[Gmail]/Starred"
Better Email Threaddebug Better Email Gmail incoming: Mailbox: (\HasNoChildren \Trash) "/" "[Gmail]/Trash"
Better Email Threaddebug Better Email Gmail incoming: Mailbox: (\HasChildren) "/" "[Mailbox]"
Better Email Threaddebug Better Email Gmail incoming: Mailbox: (\HasNoChildren) "/" "[Mailbox]/Later"
Better Email Threaddebug Better Email Gmail incoming: Mailbox: (\HasNoChildren) "/" "[Mailbox]/To Buy"
Better Email Threaddebug Better Email Gmail incoming: Mailbox: (\HasNoChildren) "/" "[Mailbox]/To Read"
Better Email Threaddebug Better Email Gmail incoming: Mailbox: (\HasNoChildren) "/" "[Mailbox]/To Watch"
Better Email Debug Better Email Gmail incoming: idleIMAPThread() called
Better Email Threaddebug Better Email Gmail Outgoing: Device Version is up to date
Better Email Debug Better Email Gmail Outgoing: Starting device (smtpAccount)
Better Email Threaddebug Better Email Icloud Incoming: Device Version is up to date
Better Email Debug Better Email Icloud Incoming: Starting device (imapAccount)
Better Email Debug Better Email Icloud Incoming: Creating IMAP Server
Better Email Debug Better Email Icloud Incoming: Using IMAP IDLE
Better Email Debug Better Email Icloud Incoming: Doing connect using encryptionType = SSL
Better Email Debug Better Email Icloud Incoming: Doing login()
Better Email Debug Better Email Icloud Incoming: Doing select("INBOX")
Better Email Threaddebug Better Email Icloud Incoming: Mailbox list:
Better Email Threaddebug Better Email Icloud Incoming: Mailbox: (\NoInferiors) "/" INBOX
Better Email Threaddebug Better Email Icloud Incoming: Mailbox: (\HasNoChildren) "/" "Apple Mail To Do"
Better Email Threaddebug Better Email Icloud Incoming: Mailbox: (\HasNoChildren) "/" Archive
Better Email Threaddebug Better Email Icloud Incoming: Mailbox: (\HasNoChildren) "/" "Deleted Messages"
Better Email Threaddebug Better Email Icloud Incoming: Mailbox: (\HasNoChildren) "/" Drafts
Better Email Threaddebug Better Email Icloud Incoming: Mailbox: (\HasNoChildren) "/" Junk
Better Email Threaddebug Better Email Icloud Incoming: Mailbox: (\HasNoChildren) "/" "Junk (.Mac)"
Better Email Threaddebug Better Email Icloud Incoming: Mailbox: (\HasNoChildren) "/" "New Folder"
Better Email Threaddebug Better Email Icloud Incoming: Mailbox: (\HasNoChildren) "/" Notes
Better Email Threaddebug Better Email Icloud Incoming: Mailbox: (\HasNoChildren) "/" "Sent Messages"
Better Email Threaddebug Better Email Icloud Incoming: Mailbox: (\HasNoChildren) "/" Starred
Better Email Threaddebug Better Email Icloud Incoming: Mailbox: (\HasNoChildren) "/" Trash
Better Email Threaddebug Better Email Icloud Incoming: Mailbox: (\HasChildren) "/" "[Airmail]"
Better Email Threaddebug Better Email Icloud Incoming: Mailbox: (\HasNoChildren) "/" "[Airmail]/Done"
Better Email Threaddebug Better Email Icloud Incoming: Mailbox: (\HasNoChildren) "/" "[Airmail]/Memo"
Better Email Threaddebug Better Email Icloud Incoming: Mailbox: (\HasNoChildren) "/" "[Airmail]/Snooze"
Better Email Threaddebug Better Email Icloud Incoming: Mailbox: (\HasNoChildren) "/" "[Airmail]/To Do"
Better Email Debug Better Email Icloud Incoming: idleIMAPThread() called
Better Email Threaddebug Better Email Icloud Outgoing: Device Version is up to date
Better Email Debug Better Email Icloud Outgoing: Starting device (smtpAccount)
Better Email Debug Better Email Gmail Outgoing: SMTP poll, 0 items in queue
Better Email Debug Better Email Icloud Outgoing: SMTP poll, 0 items in queue
I have seen the same email processed multiple times. For example:
$ grep 'Received Message Date: Tue, 12 Mar 2019 03:51:16' 2019-03-[12]*\ Events.txt
2019-03-11 Events.txt:2019-03-11 23:51:24.624 Better Email Pittstown IMAP: Received Message Date: Tue, 12 Mar 2019 03:51:16 +0000 (UTC)
2019-03-12 Events.txt:2019-03-12 23:47:26.980 Better Email Pittstown IMAP: Received Message Date: Tue, 12 Mar 2019 03:51:16 +0000 (UTC)
2019-03-13 Events.txt:2019-03-13 00:29:28.339 Better Email Pittstown IMAP: Received Message Date: Tue, 12 Mar 2019 03:51:16 +0000 (UTC)
2019-03-13 Events.txt:2019-03-13 00:40:14.244 Better Email Pittstown IMAP: Received Message Date: Tue, 12 Mar 2019 03:51:16 +0000 (UTC)
4 times on 3 different days!
Now, I'll admit that I had set the IMAP device to leave messages in the inbox, but shouldn't it only process NEW email?
I changed my config so it will move messages to an Archive folder. Hopefully that will cure my problem, but I thought you'd want to know...
Thanks for all of your great plug-ins.
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: <[email protected]>
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
Traceback (most recent call last):
File "plugin.py", line 396, in pollServer
KeyError: (615738276,)
Hello -- the email server polling worked well for a week, but suddenly stopped working and showed this error at each scheduled poll. Any thoughts as to what causes this?
Plugin currently does not handle emails with no plain-text part
Like the native email sender does
I am getting the following error
Traceback (most recent call last):
File "plugin.py", line 276, in runConcurrentThread
File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/BetterEmail.indigoPlugin/Contents/Server Plugin/IMAPServer.py", line 74, in pollCheck
AttributeError: 'IMAPServer' object has no attribute 'next_poll'
Better Email Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
Better Email Error Error in plugin execution runConcurrentThread:
Any suggestions?
Multiple POP servers will collide on the readMessages list saved in pluginPrefs. List should be saved for each POP server separately.
Currently the plugin hasn't been able to check mail for a few hours now. I also cannot open the config for the plugin either; it just times out. I even restarted the Indigo VM.
Jun 2, 2019 at 5:24:58 PM
Error process (pid 536) failed to quit after polite request -- forcing it to quit now
Stopped plugin "Better Email 7.2.4"
Starting plugin "Better Email 7.2.4" (pid 655)
Started plugin "Better Email 7.2.4"
Error (client) timeout waiting for plugin response from com.flyingdiver.indigoplugin.betteremail for request UiGetValues1
Error (client) timeout waiting for plugin response from com.flyingdiver.indigoplugin.betteremail for request CallPluginFunc
Error (client) runDialogForMenuAction() caught exception: NSInvalidArgumentException -- *** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]
Error (client) received unexpected packet response UiGetValues1 (waiting for CallPluginFunc)
It appears this error is preventing these messages from being processed, so every time mail comes in, there are a handful of these message numbers that have this error. This is what is in my Event Log after setting level to Debug. If there is more in your log file, I can attach it if you would like.
Better Email Debug Email Indigo IMAP: Checking Message # 7
Better Email Debug Email Indigo IMAP: Fetching Message # 7
Better Email Error Error fetching Message # 6: 'NoneType' object has no attribute '__getitem__'
Better Email Error exception in deviceStartComm(Email Indigo IMAP): local variable 'message' referenced before assignment
This version fixed the old issue and now a new one occurs
IMAP server connection error: 'IMAPServer' object has no attribute 'connectionLock'
Hey,
I keep getting these errors, it says no mailbox selected, I'm not sure where it determines that, both my IMAP and SMTP devices are fully configured (correctly).
I get many of these, I even tried restarted the plugin every 4 hours, and that doesn't resolve it.
2018-04-27 14:59:48.169 Better Email Warning Email Indigo IMAP: IDLE Event Timeout, reconnecting
2018-04-27 14:59:48.170 Better Email Error Error in plugin execution runConcurrentThread:
Traceback (most recent call last):
File "plugin.py", line 246, in runConcurrentThread
File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/BetterEmail.indigoPlugin/Contents/Server Plugin/IMAPServer.py", line 259, in pollCheck
File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/BetterEmail.indigoPlugin/Contents/Server Plugin/imaplib2.py", line 739, in close
error: No mailbox selected.
2018-04-27 14:59:48.171 Better Email Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.