Saving attachments |
| Author |
Liam Allen
|
| Last modified |
2003-01-15
|
|
What is this?
this script will save the first attachment of a mailbox to
a file with a name supplied by user
|
Tell Applicaton "Mailsmith"
set nummsg to (count every message of mailbox "ports")
repeat with i from nummsg to 1 by -1
set subj to subject of message i of mailbox "ports"
set portName to text returned of (display dialog "Edit Port Name" default answer subj)
if has enclosures of message i of mailbox "ports" then
set fileName to "TiggerHD:obsd_stuff:tempup:" & portName
save enclosure 1 of message i of mailbox "ports" to fileName
end if
end repeat
end tell
|