• 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
ASOC, mail insert logo problem.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ASOC, mail insert logo problem.


  • Subject: ASOC, mail insert logo problem.
  • From: Brian Christmas <email@hidden>
  • Date: Tue, 11 Dec 2012 14:54:50 +1100

G'day Scripters.

I've struck a problem where Mail cannot load a Logo image into a mail message.

The following is one of many permutations I've tried from Shane's book, but Mail does not respond.

The lines I'm referring too are 

set logoPath to MailManagerDesktopFolderPath & ":Logo.png"
set logoPath to (POSIX path of logoPath)  as POSIX file

try
make new attachment with properties {file name:logoPath} at before the first paragraph
on error errmsg
display dialog errmsg
end try

Any thoughts please?

Regards

Santa

on eMailit(the_subject, the_content, theCCRecipients)
  try
set logoPath to MailManagerDesktopFolderPath & ":Logo.png"
set logoPath to (POSIX path of logoPath)  as POSIX file
              # set logoPath to logoPath as POSIX file
              on error errmsg
              display dialog errmsg
              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
on error errmsg
                display dialog errmsg
                end try
set TempList to my readfile1("  Main Mail Recipient.dat")
repeat with themailitem in TempList
make new to recipient at end of to recipients with properties {address:themailitem}
end repeat
try
set TempList to my readfile1(theCCRecipients)
repeat with themailitem in TempList
make new cc recipient at end of cc recipients with properties {address:themailitem}
end repeat
end try
end tell
tell newMessage
send
delay 1
try
close saving no
end try
end tell
end tell
end eMailit

 _______________________________________________
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: ASOC, mail insert logo problem.
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: Scripts folder for applications
  • Next by Date: Re: ASOC, mail insert logo problem.
  • Previous by thread: Re: Scripts folder for applications
  • Next by thread: Re: ASOC, mail insert logo problem.
  • Index(es):
    • Date
    • Thread