• 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 slow creating html message
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mail slow creating html message


  • Subject: Re: Mail slow creating html message
  • From: Christopher Stone <email@hidden>
  • Date: Mon, 02 Dec 2013 00:16:19 -0600

On Dec 01, 2013, at 20:36, email@hidden wrote:
Found it during a net search.
______________________________________________________________________

Hey Mark,

Ah.  Okay.

After monkeying with it a bit some bells went off.  I don't remember where that method originally came from, but it's definitely undocumented now.

I had to make a few changes to the version on the net to get it to work.  When using FastScripts to run the script it finishes sending in ~ 3 seconds.

So it works on Mavericks with Mail 7.0 (1822).

If memory serves there's no way to make the window visible before sending if you want to send HTML mail.  On the other hand you can make the window visible if you send plain text.

--
Best Regards,
Chris

-------------------------------------------------------------------------------------------

tell application "Mail"
set _sender to "Christopher Stone <email@hidden>"
set _subject to "Test: Send HTML with Mail.app"
set _name to "Christopher Stone"
set _address to "email@hidden"
set _link to "http://www.macintouch.com"
set _source to "Tho' much is taken, much abides; and tho'<br>
We are not now that strength which in old days<br>
Moved earth and heaven; that which we are, we are;<br>
One equal temper of heroic hearts,<br>
Made weak by time and fate, but strong in will<br>
To strive, to seek, to find, and not to yield.<br><br>"


set defMsgFmt to default message format
set default message format to plain format


set newMsg to make new outgoing message with properties {subject:_subject}
tell newMsg
set sender to _sender
make new to recipient at end of to recipients with properties {name:_name, address:_address}
set html content to "<html><head><title>" & _subject & "</title></head><body>" & "<H3>This is an automated response</H3><hr><p>" & _source & "Your Mac Info Source on the web: " & _link & "
</body></html>"
end tell
send newMsg
set default message format to defMsgFmt
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 slow creating html message
      • From: Shane Stanley <email@hidden>
References: 
 >Re: Mail slow creating html message (From: email@hidden)

  • Prev by Date: Re: Mail slow creating html message
  • Next by Date: Re: Quicktime and automator with Apple script
  • Previous by thread: Re: Mail slow creating html message
  • Next by thread: Re: Mail slow creating html message
  • Index(es):
    • Date
    • Thread