PDA

View Full Version : Can mail.app schedule future delivery?




gizmo
May 19, 2003, 12:36 PM
Does anyone know if there is a way to schedule a message for automatic future delivery rather than having mail.app send it right away? Of course, I can save a draft but then I have to remember to go send it at a later time. One thing I do miss (and there isn't much I miss) about Outlook was this feature.



coolbreeze
May 19, 2003, 12:49 PM
Aaah, I miss that in Outlook too. Set it to send out a work-related message at 6:15PM...all while you tee up on the 10th hole and crack open your 5th beer...

"Workin' hard" hahaha (I wouldn't know anything about that though)...:cool:

Taft
May 19, 2003, 12:58 PM
This sounds like a job for APplescript and cron to me....

Taft

patrick0brien
May 19, 2003, 01:05 PM
-Taft

Do you have one in mind - or even better - know of where we can get a script such as this?

I'm afraid all Applescript does to me is piss me off. :D

Taft
May 19, 2003, 03:29 PM
Originally posted by patrick0brien
-Taft

Do you have one in mind - or even better - know of where we can get a script such as this?

I'm afraid all Applescript does to me is piss me off. :D

I write scripts like this all the time...but I don't know of any already written. Maybe if I get the motivation I'll write one.

Applescript can be a difficult language to learn. I find its concept of variables and references to be muddled. Also, it is way too easy to write a command that will syntactically look alright but be utterly incorrect...five tries later, you might actually get the reference you were attempting to get.

Basically, I feel your pain.

Taft

Taft

patrick0brien
May 19, 2003, 03:40 PM
-Taft

Do you have a book recommendation for my friend Giz and I?

Taft
May 19, 2003, 04:14 PM
I've learned from this document:

http://developer.apple.com/techpubs/macosx/Carbon/pdf/AppleScriptLanguageGuide.pdf

Also, you can figure out a lot by simply looking at the Dictionaries of various applications. Open the Script Editor app and select Open Dictionary from the File menu, then pick the app you want to script.

I've never tried an Applescript book. It might be a good buy. There are a lot of ins and outs to the language and we know for a fact it can be tricky. A book might ease the learning curve and make it more useable. For a Unix script kiddy like me, I can often get away with not using Applescript, but there are a lot of things Applescript can do, so its probably a good investment.

Also, are you familiar with 'cron'? Its the built-in Unix schedular. It runs automatically on a default Mac OS X install.

You can use the crontab command on the command line to edit the scheduled commands.

Do a:

crontab -e

To edit the scheduled commands. Beware! It will use vi to edit the file. Figure out how to use vi before trying to edit the file

The items to be scheduled take the following form (one item to be scheduled per line):
minute hour DayOfMonth Month DayOfWeek CommandToRun

You can specify any of the time fields with a * to indicate any value is acceptable. An example entry might look like this:

5 4 * * sun echo "run at 5 after 4 every sunday"

Here, the command to run is echo with some parameters. You could substitute that with the location of an AppleScript or command line utility. There may also be front end utilities to control cron and make it more useable for the casual user.

Taft

Taft
Jun 2, 2003, 10:36 PM
I know its been a while since you've asked the question, but I've found something that might be useful.

Try this:

http://files.macscripter.net/scriptbuilders/E-Mail/Postpone-Delayed-Send.sit

Its an Applescript that will send a message at a later time. Might be useful...

Taft

patrick0brien
Jun 3, 2003, 01:42 PM
-Taft

Thanks!

I'll pop it and see if I can point it at Mail.app.