I want to have the Apple mail application accept and email from me and then email a file to me. For example, I want to send an email with the subject "#FILE myfile.doc" and have the script trigger because of the #FILE tag in the subject, and then email me back the file called "myfile.doc".
The files will always be in the same path, but it would be nice to be able to specify the path in the script so I can create different ones for different directories.
I know nothing about Applescript and have dabbled in Automator. I only see in Mail that you can trigger an Applescript from a rule. So I don't know if this can be done in Automator.
Please be basic with your responses because I am a newbie to this.
The purpose is to get a file off my computer when I am away.
Thanks, ROY
You can do it using a mail rule in Mail. Specify your email address as sender and the subject starting with
#FILE
. Let the mail rule trigger a script like this:Using the
reply
-handler didn't work, but themake new outgoing message
did! Specify the full path to the file as subject.Be aware that this IS a security hole! Sender's email addresses can be faked and somebody knowing this can get nearly every file he (or she) wants. You could specify the allowed folders in this script, i.e.
if theSubject begins with "#FILE /Users/rbarr/Desktop/Available files/" then
or just by adjusting the conditions your mail rule is triggered.Enjoy, Michael / Hamburg