Emailer Import script
Emailer Import script
- Subject: Emailer Import script
- From: Paul <email@hidden>
- Date: Mon, 02 Apr 2001 14:43:11 -0700
I am trying to use the import script that Apple has furnished for moving
mail to the mail client of OS X. The script fails if there is no from
entry in the email. I am trying to find out how to fix this as I have
lots of emails with this sort of entry. Please help.
The portion of the script that it is having problems with is below. The
senderRecord variable is non existent if there is no from entry and thus
fails when it doesnt find one to set. What would I do if I wanted to
test for both the senderRecord and also the addressEntry entry and then
how would I also handle the addressEntry in the last line if there is no
From entry??
Thanks,
Paul
email@hidden
tell application "Finder" to set theOriginalMbox to (open for access
file tempMboxFile with write permission)
set messageList to every message of eachMailbox
set totalMessageCount to length of messageList
repeat with counter from 1 to totalMessageCount
set currentMessage to message counter of eachMailbox
set senderRecord to sender of currentMessage
set addressEntry to address of senderRecord
if class of message counter of eachMailbox is incoming message then
set messageContent to "From " & addressEntry & " " & time sent of
currentMessage & return
References: | |
| >screen lock (From: Ricardo Hamdan <email@hidden>) |