• 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
HTML in mail
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

HTML in mail


  • Subject: HTML in mail
  • From: Jim Weisbin <email@hidden>
  • Date: Thu, 21 Sep 2006 17:40:31 -0400

I've searched the lists for the answer to this, and the answer seems to be "it can't be done", but I thought I'd give it one more try:

tell application "Finder"
set theFileLocation to choose file with prompt "Please choose an HTML file to be sent:"
tell application "Mail"
activate
set theFile to open for access theFileLocation without write permission
set theHTMLContent to (read theFile from 1 to (get eof theFile)) as styled text
close access theFileLocation
log class of theHTMLContent
set the_message to make new outgoing message at beginning with properties ¬
{subject:"the_subject", visible:true, content:theHTMLContent}
tell the_message
set theName to "Some Body"
set theAddress to "email@hidden"
make new to recipient at end of to recipients with properties {name:theName, address:theAddress}
end tell
end tell
end tell


I saw a script somewhere that used the construct:
tell the_message
set html content to theHTMContent
end tell

But that doesn't work, and isn't in the dictionary.

Anyone? Thanks.


Jim Weisbin
human
138 5th avenue. 3rd floor, nyc, ny 10011
telephone 212 352 0211
facsimile  212 352 0210
<email@hidden>
http://www.humanworldwide.com



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: AppleScript runs slow on Intel Macs
  • Next by Date: Re: AppleScript runs slow on Intel Macs
  • Previous by thread: Re: Need to process all files in folder with Applescript and Excel
  • Next by thread: iTunes 7.0/QuickTime 7.1.3 causing crashes on 10.3.9 systems
  • Index(es):
    • Date
    • Thread