Hi,
Thanks for the script, this looks like it could be very helpful. Unfortunately, I seem to be running into some problems: Basically, I created the script (following the instructions set within the comments of the script) and placed it in the AppleScript OmniFocus folder. When I run the script, however, I get mixed results -- some of the reQall email messages create a proper task in omnifocus, while other reQall emails create a huge garbled mess of a task. For example, earlier I set a reminder for myself and with the message selected in Mail.app I ran the applescript -- here is the resulting task created within OmniFocus:
PHP Code:
t@reqall.com>
Received: from smtpin133.mac.com ([unknown] [10.150.68.133])
by ms212.mac.com (Sun Java(tm) System Messaging Server 7u3-12.01 64bit (built
Oct 15 2009)) with ESMTP id <0KXN000J9D6UTI20@ms212.mac.com> for
********@mac.com; Wed, 10 Feb 2010 14:30:30 -0800 (PST)
Original-recipient: rfc822;********@mac.com
Received: from mail.reqall.com ([72.32.189.34])
by smtpin133.mac.com (Sun Java(tm) System Messaging Server 7u3-14.01 64bit
(built Dec 27 2009)) with ESMTP id <0KXN00BG0D6U5G50@smtpin133.mac.com> for
**********@mac.com (ORCPT *********@mac.com); Wed,
10 Feb 2010 14:30:30 -0800 (PST)
X-Proofpoint-Virus-Version: vendor=fsecure
engine=1.12.8161:2.4.5,1.2.40,4.0.166
definitions=2010-02-10_16:2010-02-06,2010-02-10,2010-02-10 signatures=0
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0
ipscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0
reason=mlx engine=5.0.0-0908210000 definitions=main-1002100193
Received: from qtechinc.com (97500-web1.qtechinc.com [192.168.1.34])
by mail.reqall.com (Postfix) with ESMTP id 190AF18738 for
<*******[edited]@mac.com>; Wed, 10 Feb 2010 16:01:08 -0600 (CST)
Date: Wed, 10 Feb 2010 22:01:08 +0000
From: reQall <post@reqall.com>
Reply-to: reQall <post@reqall.com>
To: *********@mac.com
Message-id: <74334b732ca4cb1c_d_pid_5035163@reqall.com>
Subject: Reminder for Feb 10, 2010 2:00 PM: remind me to open at 2:00pm
MIME-version: 1.0
Content-type: multipart/mixed;
boundary=mimepart_4b732ca41824c_649d..fdbfe3b6a3b0
--mimepart_4b732ca41824c_649d..fdbfe3b6a3b0
Content-Type: multipart/alternative; boundary=mimepart_4b732ca418763_649d..fdbfe3b6a4d4
--mimepart_4b732ca418763_649d..fdbfe3b6a4d4
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: Quoted-printable
Content-Disposition: inline
reQall reminder:
remind me to open at 2:00pm
http://www.reqall.com/webnew/webeditpost/5035163
Edit this item.
-----------------------------------------------------------------------
You can control or turn off reminder emails on the http://www.reqall.com/=
webnew/notifications reQall Settings page.
You can invite your friends to try reQall at http://www.reqall.com/web/in=
vite_multiple. =
If you're a reQall Pro user you can reply to this email (reQall <post@=
reqall.com>) to tell reQall how to mark this item. Use a one-word repl=
y at the top of the content area: done, delete, pending or help.
-----------------------------------------------------------------------
http://www.reqall.com
--mimepart_4b732ca418763_649d..fdbfe3b6a4d4
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: Quoted-printable
Content-Disposition: inline
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://ww=
w.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns=3D"http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf-8" =
/>
<title>reQall</title>
</head>
<body style=3D" font-family:Helvetica, Verdana, Arial, sans-serif; font-s=
ize:10pt;">
=
<strong>reQall reminder:</strong><br/>
remind me to open at 2:00pm<br>
<a href=3D"http://www.reqall.com/webnew/webeditpost/5035163" target=3D"_b=
lank" style=3D"text-decoration:none; color: #0066FF;">
Edit this item</a><br /><br />
<hr size=3D"1" noshade=3D"noshade" color=3D"#E8E8E8" height=3D"1px"/>
<font style=3D"font-size:7pt;">
=
You can control or turn off reminder emails on the <a href=3D"http://www.=
reqall.com/webnew/notifications" target=3D"_blank" style=3D"text-decorati=
on:none; color: #0066FF;"> reQall Settings</a> page.
<br />You can <a href=3D"http://www.reqall.com/web/invite_multiple" targe=
t=3D"_blank" style=3D"text-decoration:none; color: #0066FF;">invite your =
friends</a> to try reQall. <br />
If you're a reQall Pro user you can reply to this email to tell reQall ho=
w to mark this item. Use a one-word reply at the top of the content area:=
done, delete, pending or help.
</font>
<hr size=3D"1" noshade=3D"noshade" color=3D"silver" height=3D"1px"/>
=
<font style=3D"font-size:7pt;"><a href=3D"http://www.reqall.com/" style=3D=
"text-decoration:none; color: #0066FF;">www.reqall.com</a></font>
</body>
</html>
=
--mimepart_4b732ca418763_649d..fdbfe3b6a4d4--
--mimepart_4b732ca41824c_649d..fdbfe3b6a3b0-- (via reQall)
Any help on what this means would be greatly appreciated. Also, exactly what do I have to set the mail rules to in the Mail.app in order for messages from reQall to automatically be filed into omnifocus? I can't seem to get that to work either.
Thank you so so much for your help!
PS - here is the applescript code I am using just in case that is needed:
PHP Code:
(* Modified "Jott to OmniFocus" modified by dbyler to work with reQall mail. *)
-- Derived from work that is Copyright © 2007, Curtis Clifton All rights reserved.
-- Modified to work specifically with Jott messages.
-- See http://forums.omnigroup.com/showthread.php?t=7651
-- If true, then the sender of the message is included in the action's description.
property includeSender : true
property messageSender : "reQall"
on run
tell application "Mail"
set selectedMessages to selection
if ((count of selectedMessages) ≠ 1) then
display alert "Please select a message to be linked to the new action" message "This script creates a new OmniFocus action that links back to a selected message." buttons {"OK"} default button "OK" giving up after 20
return
end if
my process_message(item 1 of selectedMessages)
end tell
end run
using terms from application "Mail"
on perform mail action with messages theMessages
try
set theMessageCount to count of theMessages
repeat with theMessageIndex from 1 to theMessageCount
my process_message(item theMessageIndex of theMessages)
end repeat
on error m number n
tell application "OmniFocus"
log "Exception in Mail action: (" & n & ") " & m
end tell
end try
end perform mail action with messages
end using terms from
on process_message(theMessage)
tell application "Mail"
set theContent to source of theMessage
set theDate to date sent of theMessage
set messageId to message id of theMessage
end tell
tell application "OmniFocus"
set messageStart to (offset of "Added to reqall:" in theContent) + 18
set messageEnd to (offset of "Edit this item at" in theContent) - 2
set taskName to rich text messageStart through messageEnd of theContent
if (includeSender) then
set taskName to taskName & " (via " & messageSender & ")"
end if
set theDoc to default document
--Uncomment next line if you wish to set default context. Context must exist first.
set taskContext to context "reQall" of default document
tell theDoc
-- Delete the next line, uncomment the next one if you wish to set default context
set propRecord to {name:taskName, context:taskContext}
set theTask to make new inbox task with properties propRecord
end tell
tell theTask
set start date to theDate
set note to return & return
tell note
set theURL to "message://<" & messageId & ">"
set linkText to theURL
insert linkText at before first character
set value of attribute "link" of style of paragraph 1 to theURL
end tell
end tell
end tell
end process_message