• 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 App - plain text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mail App - plain text


  • Subject: Re: Mail App - plain text
  • From: Dave Balderstone <email@hidden>
  • Date: Wed, 30 Mar 2011 13:50:46 -0600

On 2011-03-30, at 1:25 PM, Michelle Steiner wrote:

> tell application "Mail"
> 	set default message format to plain text
> 	set newMessage to make new outgoing message with properties {subject:"mailSubject", content:"mailContent" as text, visible:true}
> 	set default message format to rich text
> end tell

I'd save and restore the prefs slightly differently, especially if the script is running on someone else's Mac, but that may be a matter of preference:

tell application "Mail"
	set oldFormat to default message format
	set default message format to plain text
	set newMessage to make new outgoing message with properties {subject:"mailSubject", content:"mailContent" as text, visible:true}
	set default message format to oldFormat
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

  • Follow-Ups:
    • Re: Mail App - plain text
      • From: Michelle Steiner <email@hidden>
References: 
 >Mail App - plain text (From: Steve Valenti <email@hidden>)
 >Re: Mail App - plain text (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Re: Mail App - plain text
  • Next by Date: Re: Mail App - plain text
  • Previous by thread: Re: Mail App - plain text
  • Next by thread: Re: Mail App - plain text
  • Index(es):
    • Date
    • Thread