Save Apple Mail attachments, RTF email & Print Script HELP
Save Apple Mail attachments, RTF email & Print Script HELP
- Subject: Save Apple Mail attachments, RTF email & Print Script HELP
- From: Dale Minter <email@hidden>
- Date: Sun, 17 Apr 2005 21:37:46 +1200
Hi all,
I have never written an applescript before (well nothing more than auto
connect to share points) and need to get something together to do the
following tasks by Wednesday. Hmm, pretty tight huh! I am in WAY OVER
MY HEAD, So I am relying on your guys to help me out. A few late nights
may be in order! Any guidance/direction/source script help would be
appreciated.
What I need the script to do:
- Apple Mail files email into a pre setup Mail folder (according to the
"to" address) and then runs following Applescript (via Mail rules).
- First looks to tab delimited text file containing sender email
addresses and file path to process eg:
SENDER Address: Folder Path:
email@hidden /Volume/share/emails/xyz
email@hidden /Volume/share/emails/abc etc
- If sender address in text file MATCHES incoming email:
a) Check and see if "Folder Path" exists, if not create it.
b) Under folder path, check and see if folders /emails, and or
/attachments exist. if not create them.
c) Copy RTF (essential, not plain text) email to "/emails" folder under
main Folder Path (do not save RTF with actual attachments, only
attachment names). Name RTF email "date_time.rtf" eg.
150305_18:03:05.rtf
d) Save all attachments in "/attachments" folder
e) If duplicate attachment, rename to "sender_time.xxx" eg.
xyz_18:03:05.tif
f) Print email to default printer with attachment name listed on print
- If sender address in text file DOES NOT match incoming email:
a) Applescript looks to a SECOND tab delimited text file in the
following format:
TO Address: Alternative Email:
email@hidden email@hidden
email@hidden email@hidden
b) Forward email AND attachments to "Alternative Email "" address
(according to the "To:" address in email)
c) If not on either then forward email to: email@hidden
- Any errors in above forward email to: email@hidden with subject
"Email Scripting Error from "sender address".
I have done a bit of research and found out that the do shell script
"lpr" command is used for the printing. i think this is the easy part?
The problems are with Mail's scripting and workarounds for the saving
of attachments. i believe there is a solution using stuffit expander?
Any insight? The other problem is with saving RTF emails from Apple
Mail. But I hope to incorporate "Apple Mail Scripts" Archive Messages
(http://homepage.mac.com/aamann/Mail_Scripts.html) as a fix. I have no
idea how to look to a tab delimited text file for variable data.
Has anyone done something similar and is willing to share? or advise? I
am getting so desperate that if someone can help me out (ie. provide
completed script) on this I would be willing to send US$200 their way.
Help!
Kind regards,
Dale
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden