• 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: Apple Mail adding attachments hoses signature
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Apple Mail adding attachments hoses signature


  • Subject: Re: Apple Mail adding attachments hoses signature
  • From: Brian Christmas <email@hidden>
  • Date: Wed, 08 Feb 2012 20:19:17 +1100


On 08/02/2012, at 8:03 PM, Christopher Stone wrote:

On Feb 08, 2012, at 02:42, David Ferrington wrote:
In which way are attachments broken in Lion - are they only broken in A/S or are they broken full stop?
______________________________________________________________________

Hey David,

Attachments work fine in Lion's Mail.app, but attaching them via script is broken.

--
Best Regards,
Chris


G'day

I've got a very long script that uses multiple instances of adding attachments to Mail, in Lion, and it works fine.

Part of the script is added below.

Regards

Santa

                try
set LogoPath to MailPrintingFolder & ":Logo.png"
set LogoPath to POSIX path of LogoPath
on error
set LogoPath to ""
end try
tell application "Mail"
activate


set newMessage to make new outgoing message with properties {visible:true, subject:the_subject, content:the_content}
tell content of newMessage
try
set y to count of the_content
set color of characters 1 thru y to textcolor
end try
set x to offset of TheBusinessName in the_content
set font of characters x thru (x + (count of TheBusinessName) - 1) to "Helvetica Bold"
set color of characters x thru (x + (count of TheBusinessName) - 1) to {56342, 2442, 607}
repeat with x from 1 to (count of the_content)
if character x of the_content = "●" then
set color of character x to {56342, 2442, 607}
end if
end repeat
end tell
tell newMessage
try
make new attachment with properties {file name:LogoPath} at before the first paragraph
end try
repeat with themailitem in MainMailRecipient
make new to recipient at end of to recipients with properties {address:themailitem}
end repeat
repeat with themailitem in ReportCCRecepients
make new cc recipient at end of cc recipients with properties {address:themailitem}
end repeat
end tell
tell newMessage
send
delay 1
try
close saving no
end try
end tell
  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

References: 
 >Apple Mail adding attachments hoses signature (From: Cameron Knowlton <email@hidden>)
 >Re: Apple Mail adding attachments hoses signature (From: Cameron Knowlton <email@hidden>)
 >Re: Apple Mail adding attachments hoses signature (From: David Ferrington <email@hidden>)
 >Re: Apple Mail adding attachments hoses signature (From: Christopher Stone <email@hidden>)

  • Prev by Date: Re: Apple Mail adding attachments hoses signature
  • Next by Date: Re: Sort error in Leopard
  • Previous by thread: Re: Apple Mail adding attachments hoses signature
  • Next by thread: Re: How applescriptable is Media Bank?
  • Index(es):
    • Date
    • Thread