Unreliable Mail.app AppleScript Rules
Unreliable Mail.app AppleScript Rules
- Subject: Unreliable Mail.app AppleScript Rules
- From: Matt Petrowsky <email@hidden>
- Date: Mon, 10 Feb 2003 17:16:01 -0800
Here's a perplexing issue for people scripting Mail.app and FileMaker
Pro. Primarily for moving email messages into a FileMaker production
system.
After a few hours of testing with the ability to run an AppleScript as
a mail rule in the Mail.app application I have found some really weird
results.
I have setup a FileMaker Pro database that will capture incoming email
based on criteria within a rule. This is to be used for a transactional
system wherein there WILL be messages that will be exactly the same or
similar enough to each other that at certain points the AppleScript run
by the mail rule will fail.
It seems that running the AppleScript has some type of memory leak
based on the raw source of the message.
In order to get data into FileMaker Pro you can use a single line of
code, provided you know the order of fields on a given layout. The code
is very efficient. However, it will fail every Nth item depending on
what is in the incoming email message - it seems.
For example. If you run a given rule with an attached AppleScript on a
given message more than a certain number of times then AppleScript will
fail to move the information from the message to AppleScript's memory
then over to FileMaker.
I have attached an archive with all files needed for testing. Here are
the steps for setup...
1. Close Mail.app
2. Drag the Testing.mbox into your Mail folder in
~/Library/Mail/Mailboxes
3. Open FileMaker and open the Capture.fp5 database
4. Launch Mail.app and create a Mail Rule in Mail.app preferences. (See
Picture 1.pdf)
5. Attach the Demo Capture.scpt to the rule*
6. Select one of the messages in the Testing mailbox (there are only 4
of them)
7. With a single message selected use Apply Rules (Cmd-Opt-L) multiple
times on the message - more than 10
*If using FileMaker Developer you'll need to modify the tell statements
to "FileMaker Developer"
Notice the results I got on my machine...
XML.org Message - Misses content every other record
Starwood Message - Misses content every 2nd record
[ANN] Free FileMaker - Misses content every 5th record
Fwd: Rd: Mail Rules - Misses headers & content every 4th record
Is this a bug with AppleScript, Mail.app or FileMaker? Who knows. I've
attached the compressed archive (72k) to this message. If the list
kicks the attachment you can email me direct at email@hidden
you may want the code that makes it easy to move email messages into
FileMaker. Note: If you want to archive email messages into FileMaker
you ONLY need two items from the message, the Header and the Content.
Make FileMaker parse the sender, subject, reply-to and other info from
the Header. This is a thousand times faster! Just a tip for those of
you working with FileMaker.
Matt Petrowsky
[demime 0.98b removed an attachment of type application/x-stuffit which had a name of Capture_Test.sit]
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.