• 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: HTML Mail.app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HTML Mail.app


  • Subject: Re: HTML Mail.app
  • From: Brian Christmas <email@hidden>
  • Date: Fri, 26 Aug 2011 21:22:24 +1000

G'day Wayne

I've found that under Lion, if you create a mail message whose visible is false, the message does not get sent.

You have to stipulate visible true to allow the message to wing on it's way.

Feedback lodged as a bug.

Regards

Santa


On 26/08/2011, at 9:15 PM, wayne melrose wrote:

OK.. a little embarrassing.. Might have found a solution that I'd already stumbled on earlier. 

I'd found someone posted about 'html content' when creating a new mail message, the problem was that the mail was not visible when trying to send. After restarting my computer just now, I discovered that the mail messages's visibility was now on and had a few open windows.. 

By just ignoring that and going ahead and sending the message, I found it worked. 

set strSubject to "test"
set strRecipientEmail to "email@hidden"
set strHTML to "<html><body><strong>Blah</strong><p>blah</p></body></html>"

tell application "Mail"
set objNewMessage to make new outgoing message with properties {subject:strSubject, html content:strHTML, visible:true}
tell objNewMessage
make new to recipient at end of to recipients with properties {address:strRecipientEmail}
end tell
send objNewMessage
end tell

Still would love to know how to do it with Ruby though if it's a better solution. 




On Aug 26, 2011, at 12:40 PM, wayne melrose wrote:

Hi, 


I'm already cowering at the idea of posting this, because I already know the answer.. I think.. 

Is it possible to send a HTML formatted email from Mail.app. 

I don't want plugins, I don't want another mail program.  and no I don't want GUI scripting  :-) 
Reason I say that is because this is not for me personally, this is for a workflow situation where I know the users have already been assigned Mail.app to use, and I want it to work natively for robustness (robustness .. can't believe that's a word..!?)
I don't want to rely on a plugin because again, this could mean setting it up on multiple machines, and I don't want the hassle and then also OS changes could break it. 
GUI scripting is another thing I'd just not want to have to configure, and I think this is a poor solution for making robust code. 

What I've found out.  
Safari
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: HTML Mail.app
      • From: wayne melrose <email@hidden>
References: 
 >HTML Mail.app (From: wayne melrose <email@hidden>)
 >Re: HTML Mail.app (From: wayne melrose <email@hidden>)

  • Prev by Date: Re: HTML Mail.app
  • Next by Date: Re: HTML Mail.app
  • Previous by thread: Re: HTML Mail.app
  • Next by thread: Re: HTML Mail.app
  • Index(es):
    • Date
    • Thread