Re: Bug introduced in Mail after Safari 5 install
Re: Bug introduced in Mail after Safari 5 install
- Subject: Re: Bug introduced in Mail after Safari 5 install
- From: Deivy Marck Petrescu <email@hidden>
- Date: Sun, 13 Jun 2010 10:24:21 -0400
On Jun 11, 2010, at 9:44 PM, Brooks Bell wrote:
> Our application uses AppleScript to tell Mail to create a message with an
> attachment. After installing Safari 5 users are reporting that the content
> text area of the outgoing message has a black background. This doesn't
> contrast very well with the black text.
>
> Below is a script that demonstrates the problem. As I workaround I tried
> inserting this line:
> set background color of newMessage to none
> But it doesn't run. Any advice is appreciated.
>
>
> tell application "Mail"
> set addressvar to "email@hidden"
> set subjectvar to "Test Subject"
> set contentVar to "This is the content"
> set attachmentVar to "%@"
> set saveAsDrafts to true
> set singleJob to true
> set newMessage to make new outgoing message
> tell newMessage
> set visible to singleJob
> make new to recipient with properties {address:addressvar}
> set subject to subjectvar
> set content to contentVar
> tell content
> make new attachment with properties {file name:attachmentVar} at
> after the last paragraph
> end tell
> if singleJob is equal to 1 then
> activate
> else
> if saveAsDrafts is equal to 0 then
> send newMessage
> else
> save newMessage as "draft"
> close newMessage
> end if
> end if
> end tell
> end tell
>
>
The problem is that the message that gets written in the body of the draft email is the following html code (raw source):
<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; background-color: rgb(0, 0, 0); "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000">This is the content</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; color: rgb(0, 0, 0); background-color: rgb(0, 0, 0); min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; color: rgb(0, 0, 0); background-color: rgb(0, 0, 0); min-height: 14px; "><br></div><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica"></font></p> </div></body></html>
This happens regardless of the kind of text settings one has for outgoing mail.
The culprit is the second <div> tag!
Unfortunately raw source is read only.
Now, I haven't tried but if
Deivy Petrescu
email@hidden
_______________________________________________
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