Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread Display Modes
Old Apr 25, 2012, 10:20 AM   #1
macrumors newbie
Join Date: Jan 2008
Automator action for sending draft mails via iCal event

Hi all,
I'm trying to create an automator action that will look in a specific mailbox (sendlater), and then send all the messages in it. This automator action I want to trigger via an recurring iCal event (everyday at 2 and 4pm).
I don't get the action to work.. I guess because my applescript knowledge isn't sufficient. Error: message id 33240 of mailbox "Sendlater" of account "marlonbos@me.com" doesn’t understand the send message.

Is there someone who can tell me what I'm doing wrong?

Great thanks!
Greats, Marlon

(See my automator action attached)
Attached Files
File Type: zip send later.zip (64.4 KB, 43 views)
marl0n is offline   0 Reply With Quote
Old Apr 25, 2012, 09:27 PM   #2
macrumors 6502a
Join Date: Mar 2012
Location: Belgium
Have you tried a Send Outgoing Messages action as your third action instead of the run applescript action?

This action sends the outgoing email messages in the Mail application.

Note: If outgoing messages are passed from the previous action, only they will be sent. If no messages are passed in, all outgoing messages will be sent.
I found this on MacScripter by a member regulus6633. Big thanks to him. You need to have Enable access for assistive devices turned on. You can find it in System Preferences under Universal Access. No need for the Mail actions :

	tell application "Mail"
		set the_messages to (every message of mailbox "sendlater")
		set mess_viewer to first message viewer
		set selected mailboxes of mess_viewer to {mailbox "sendlater"}
		repeat with this_mess in the_messages
			set selected messages of mess_viewer to (this_mess as list)
			tell application "System Events" to tell process "Mail"
				delay 0.2
				keystroke "d" using command down & shift down
				delay 0.2
				keystroke "d" using command down & shift down
			end tell
		end repeat
	end tell
	--	end if
	return this_mess
on error TheError
	tell me to activate
	display alert "An error has occurred:" message TheError as warning giving up after 20
end try
kryten2 is offline   0 Reply With Quote

MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Automator folder action not working NYR99 OS X 0 Mar 11, 2014 01:48 AM
How can I avoid draft mails being deleted on iPhone iPad Need to sent templates IOS7 victorchr iPad Tips, Help and Troubleshooting 4 Nov 23, 2013 05:41 AM
help with automator and ical bhs00 Mac Basics and Help 1 May 3, 2013 10:25 AM
Automator Workflows/Application/Service/Folder Action SweeneyD24 OS X 0 Mar 1, 2013 01:15 AM
Sending draft emails without forwarding? -pete- iPhone Tips, Help and Troubleshooting 2 Jan 28, 2013 10:17 AM

Forum Jump

All times are GMT -5. The time now is 11:15 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2015, MacRumors.com, LLC