• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Automate Mail.app reply
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Automate Mail.app reply


  • Subject: Automate Mail.app reply
  • From: Sander Rijken <email@hidden>
  • Date: Sat, 12 Jan 2008 22:40:56 +0100

Hello,

I'm trying to write an AppleScript automator task to reply to mail messages passed in by some other action. To do so I first created a testscript which has some problems.

Can someone help me diagnose those problems, or give other advice on this script?

By the way, I'm running Leopard, and the discussion going on here doesn't seem very promising:
http://discussions.apple.com/message.jspa?messageID=5791481

-- 
Regards,
Sander Rijken

PS: sorry if this is a repost, but it seems that the first post has gone wrong
tell application "Mail"
	set theContent to text returned of (display dialog "Enter the message that should be sent" default answer "Message" buttons {"OK"} default button 1)
	tell the front message viewer
		set theMessages to selected messages
	end tell
	repeat with theMessage in theMessages

		set theSender to sender of theMessage
		set senderName to extract name from theSender
		set senderAddress to extract address from theSender

		if theMessage is not equal to missing value then

			(* causes 2 message windows, one is the reply, the other one is a message which is all blank (headers+body) *)
			set theReply to reply theMessage with properties

			(* sometimes fails with AppleEvent handler failed *)
			make new cc recipient at end of cc recipients of theReply with properties {address:"<email@hidden>"}
			set content of theReply to theContent
			send theReply
		end if
	end repeat
end tell
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Prev by Date: Re: Scripting a Password into a PDF
  • Next by Date: Re: scrpting Script Editor (save as script)
  • Previous by thread: Automate Mail.app reply
  • Next by thread: Scripting a Password into a PDF
  • Index(es):
    • Date
    • Thread