Hello everyone,
I have an interesting question…I’m trying to create a script that send an e-mail to a specific address on a weekly basis. The e-mail is being sent to a laundry pickup service, which needs at least 2 days notice before pickup. So, if I run the script let’s say every Saturday, I need it to automatically figure out the date that is 2 days after the date when it runs, and insert that into the e-mail output. Look at the script below:
set theOutput to "Hello,
I'd like laundry pickup at 160 Massachusetts Avenue, Boston MA. If you have any questions, feel free to contact me on my cell, (609)922-3838.
Please have the driver call me so I can meet him outside the building.
Thanks so much,
Rocco Fiorentino"
tell application "Mail"
activate
set theMessage to make new outgoing message with properties {visible:true, sender:"rfiorentino1@berklee.edu", subject:"laundry pickup", content:theOutput}
tell theMessage
make new to recipient with properties {address:"delivery@sarnidrycleaners.com"}
send
end tell
end tell
I’d like this to read instead:
"I’d like laundry pickup at address ---- on date {3 days after the current date}.
Is this possible through a script, or am I better off doing this manually. Also, I was planning to run this as an application and have calendar run the application as an alert for the weekly event. However, if my laptop isn’t on at that time, I assume the e-mail won’t be sent…is there any way around this, or a better way of scheduling the script?
Thanks so much in advance for any help.
Rocco