• 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
Re: Mail script not working on Leopard
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mail script not working on Leopard


  • Subject: Re: Mail script not working on Leopard
  • From: Alan Fairlie <email@hidden>
  • Date: Fri, 11 Apr 2008 09:00:42 +1000

Thanks for your help Philip.

Alan.

On 10/04/2008, at 6:20 PM, Philip Aker wrote:
On 08-04-09, at 22:58, Alan Fairlie wrote:

The following script works on Tiger but not on Leopard.

tell application "Mail"
set newMsg to make new outgoing message
tell newMsg to make new to recipient
tell newMsg to make new cc recipient

set sender of newMsg to "address1"
set subject of newMsg to "Subject"
set content of newMsg to "content"
set address of first to recipient of newMsg to "address2"
set address of first cc recipient of newMsg to "address1"
send newMsg
end tell

error log

"Mail got an error: Can’t get to recipient 1 of outgoing message id 375171936. Invalid index."

Any help would be appreciated.

tell application "Mail"
set body to ""
set newMsg to make new outgoing message
tell newMsg to make new to recipient with properties {address:"email@hidden"}
tell newMsg to make new cc recipient with properties {address:"email@hidden"}
set sender of newMsg to "email@hidden"
set subject of newMsg to "Subject"
tell application "Script Editor"
set my body to (text of document 1)
end tell
set content of newMsg to body
send newMsg
end tell

Philip Aker
echo email@hidden@nl | tr a-z@. p-za-o.@





 _______________________________________________
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

References: 
 >Mail script not working on Leopard (From: Alan Fairlie <email@hidden>)
 >Re: Mail script not working on Leopard (From: Philip Aker <email@hidden>)

  • Prev by Date: Re: Woes controlling outgoing messages with Rubycocoa + Scripting Bridge
  • Next by Date: Re: When can you use the 'whose' clause (Filter)
  • Previous by thread: Re: Mail script not working on Leopard
  • Next by thread: Another Mail question...
  • Index(es):
    • Date
    • Thread