The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniFocus > OmniFocus 1 for Mac
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
Mail to OmniFocus app stopped working Thread Tools Search this Thread Display Modes
Quote:
Originally Posted by PBenz View Post
In my case, the script thinks that the sender of the message is not me, even though the email in Sent Items is definitely from me. You can see the log message in the Console app. It thinks the email is from somebody else:

9/13/12 8:02:46.938 AM OmniFocus[5624]: OmniFocus Mail Rule: Received message from unauthorized sender <incorrect email address here> - ignoring message

I sent another test from a different email account, and it worked. And then I sent a 3rd test from the original account, and now that worked too! Weird.

There is a clue, though: the person associated with the incorrect email address sent me an email about 20 minutes before I sent the email to OF. It was sitting in my inbox unread. I can't seem to reproduce the problem, though.
That means your correspondent with the incorrect email address sent you a message which got run through the rule for OmniFocus. Unless you've altered your Mail rule, that means it matched against the condition you specified (subject line starting characters or recipient containing "+omnifocus@"). That preference is just used to construct the rule in Mail.app that chooses which messages to attempt to process with the OmniFocus applescript, and you can tinker with the rule or even build your own if you want something else. I've got over a dozen such rules feeding email into OmniFocus, and the allowed senders list is rather lengthy.

If there's any doubt about which message is triggering the rule, you could extend the logging a bit, perhaps something like this:
Code:
		-- Allow the user to type in the full sender address in case our trimming logic doesn't handle the address they are using.
		set theSender to sender of theMessage
		set theSubject to subject of theMessage
		set theText to content of theMessage
		if (length of theText > 80) then
			set theText to text 1 through 80 of theText
		end if
		set trimmedSender to my trim_address(theSender)
		tell application "OmniFocus"
			set AllowedSender to allowed mail senders
			if AllowedSender does not contain trimmedSender and AllowedSender does not contain theSender then
				log "OmniFocus Mail Rule: Ignoring message from unauthorized sender " & trimmedSender & return & "  Subject: " & theSubject & return & "  Text: " & theText 
				return
			end if
		end tell
I've only tested that fragment on a 10.6.8 system; your mileage may vary with Lion or Mountain Lion. Whoever put the original log message in got burned by some difference between the various cats (the result being that the script didn't compile on Snow Leopard after the change was made, and so the mail rule didn't work at all until the problem was corrected!) so I'm a bit sensitive here :-)
 
Quote:
Originally Posted by whpalmer4 View Post
That means your correspondent with the incorrect email address sent you a message which got run through the rule for OmniFocus. Unless you've altered your Mail rule, that means it matched against the condition you specified (subject line starting characters or recipient containing "+omnifocus@").
If that were true, then wouldn't the email have been deleted just like test emails to OmniFocus? Deleting the message is the first step in the rule (and I believe that's the default - I did not change the OmniFocus rule), yet the email from the incorrect corespondent remained in my inbox.

It seems that the script received false information somehow. It's like the correct email was run through the rule, but the script thought it was from somebody else. I suppose this could be a bug in Mail itself.

And to clarify, it's working just fine now after I sent a test email from a different email address to OF, verified that it worked, then sent another one from my primary email address.

Very strange indeed.

Thanks for the code, btw. I will give that a shot if it starts acting up again.
 
That is indeed interesting. There doesn't appear to be any signaling of success or failure by the script back to Mail, so even if we were to propose that perhaps the script is fired off before the message is actually deleted, there's nothing to alert Mail to abort the processing of the rule and leave the message unmolested.

So is the timestamp on the log message within a few seconds of when you received the email that remained unread but seemingly triggered the error? Trying to rule out the possibility that there was another message from the same sender which triggered the rule and was deleted...
 
Quote:
Originally Posted by whpalmer4 View Post
So is the timestamp on the log message within a few seconds of when you received the email that remained unread but seemingly triggered the error?
No - the email from my friend, let's call him friend@email.com, arrived at 11:02pm last night, and my email to OF was processed at 11:26pm. Here's the exact log message:

9/12/12 11:26:29.291 PM OmniFocus[5624]: OmniFocus Mail Rule: Received message from unauthorized sender friend@email.com - ignoring message

The email from friend@email.com remained unread in my inbox, yet the email to OF was deleted.
 
Did you have the Mail app open at the time your friend's email hit the server? And are you positive that you only received one email from this friend? Did your email to OmniFocus make it into the database? How many of these showed up in the log?

OmniFocus calling process_message in MailAction script

Certainly possible there's some race condition or other bug in Mail that results in the wrong information being handed off now and then, but I've run many hundreds of messages through this feature without encountering it. Makes me rather curious!
 
Quote:
Originally Posted by whpalmer4 View Post
Did you have the Mail app open at the time your friend's email hit the server? And are you positive that you only received one email from this friend? Did your email to OmniFocus make it into the database? How many of these showed up in the log
Yes, yes, no, and 2 - this morning I sent another test email to OF and got the same result. It was at that point that I sent a 3rd email but from a different email account. That one went through, and now the original email works as well.

Bizarre, right? I prefer to actively work on this problem by not thinking about it. lol
 
I am having the same problem. I tried Granmon's suggested edits to the script but that did not fix the problem.

OmniGroup, any idea when this will be fixed?
 
I can confirm a problem with the script, but it's slightly different symptoms. The logs confirm that the process_message is being called, but nothing is showing up in Omnifocus. It did work, once, when a message was in the inbox with the right subject line, and I right-clicked and said 'run rules', but never automatically.

Short version: mail rules are working fine, process_message broken.
 
Has anyone managed to get this MailAction script to work? Has anyone at Omni bothered to look at this?

I use Mail Act-On to allow messages to be marked as 'Actions', various tags set (in MailTags) and then it sent to OmniFocus with a single "~A" keystroke. This USED to work, but hasn't for a while. Nothing now happens when the script is called.

Can Omni please either update the Applescript with a working version, or at the very least identify what the problem is? I realise that you're all working on OF2, but your customers are still hobbling along with an buggy / unfinished version 1. It speaks volumes about Omni that nothing every seems to be properly finished or resolved. There are always lots of promises about future features and "power", but the the day-to-day experience is one of extreme frustration that nothing ever quite works or is quite implemented properly.

It's always jam tomorrow, and never jam today.
 
I spent a little time looking at this today since I really wanted the email feature to work.

I found the script itself worked okay but it would process the wrong message which means generally it would fail because the sender wasn't correct. It would also create lots of stuff in OF. I am using IMAP for the mail account.

The solution for me was to delete the action to delete the email and also any action to move it to a folder. I could still mark it as read however.

I even tried to break the processing into two separate rules, one to run the script and another to move or delete the email. Wouldn't work that way either.

As soon as any rule (even a later one) touched the email to move it somewhere the script would process the wrong email.

For now I simply set up a separate email box and mark the messages read then stop processing rules. I just leave them in the Inbox (undeleted). I added additional matching criteria against the new mail account too for good measure. That seems to work okay so far. Here is my screenshot of the mail rule. I didn't have to modify the applescript (except a little for initial debugging).

My environment is OSX 10.8.5 and Mac Mail 6.6 (1510).

Hope this helps someone.
Attached Thumbnails
Click image for larger version

Name:	rule.jpg
Views:	200
Size:	75.0 KB
ID:	2923  
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Omnioutliner stopped working KimKelln OmniOutliner 3 for Mac 1 2012-07-19 10:59 AM
Clip-o-tron / mail.app mysteriously stopped working jrapp111 OmniFocus Extras 3 2010-03-08 06:16 PM
My sync stopped working Leila OmniFocus 1 for Mac 2 2010-01-19 12:49 AM
Bookmarklets stopped working - facej OmniWeb Bug Reports 0 2009-05-22 06:33 AM
Import from mail stopped working (build 95760)? thoresson OmniFocus 1 for Mac 3 2007-12-10 08:10 AM


All times are GMT -8. The time now is 10:21 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.