• 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 App - plain text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mail App - plain text


  • Subject: Re: Mail App - plain text
  • From: Steve Valenti <email@hidden>
  • Date: Thu, 31 Mar 2011 09:45:39 -0400
  • Thread-topic: Re: Mail App - plain text

This still is not working for me. Here is the situation… I’m composing an email with some text and attaching all the jpg files that are in a certain folder. This is being sent to people with window PCs using outlook 2007. When they receive the attachments they should appear as icons and not pictures within the viewer (that’s just the way it has to be). If I stop the script before “send newMessage” and in mail choose format > Make Plain Text, the attachments will arrive as icons or if I do not send any text with the email (contents:mailContent) it will also be correct.

 

This use to work fine with mail 2.1.3. Now I need to make it work with mail 4.2.

Any suggestions???

 

 

 

 

set insigniaNumberName to "MP123456-Sample1"

set mailContent to "Blah blah blah" & return & "Blah blah blah" & return & return as text

set associateAddress to "email@hidden"

set insigniaPath to "PathToJobFolder:MP123456-Sample1:"

 

composeMail(insigniaNumberName, mailContent, associateAddress, insigniaPath)

 

 

on composeMail(insigniaNumberName, mailContent, associateAddress, insigniaPath)

          tell application "Finder"

                   try

                             set fileList to name of every file of folder insigniaPath whose name ends with ".jpg"

                   end try

          end tell

         

          tell application "Mail"

                   set default message format to plain text

                   set newMessage to make new outgoing message with properties {subject:insigniaNumberName, visible:false, content:mailContent}

                   tell newMessage

                             make new to recipient at beginning with properties {address:associateAddress}

                             repeat with i in fileList

                                      set pathToJpg to insigniaPath & (i as string)

                                      make new attachment with properties {file name:(pathToJpg as alias)}

                             end repeat

                             send newMessage

                   end tell

          end tell

end composeMail

 

 

 

 

 

 

 

On Mar 30, 2011, at 11:40 AM, Steve Valenti wrote:



How do you make an outgoing message format plain text?

Every time I run this code it still remains in rich text…

 

tell application "Mail"

        set newMessage to make new outgoing message with properties {subject:"mailSubject", content:"mailContent" as text,visible:true, default message format:plain text}

end tell

 

"default message format" is an application property that sets the default for all messages; it is not a property of a message.

 

So the script would have to be something like this:

 

          tell application "Mail"

                                 set default message format to plain text

                                 set newMessage to make new outgoing message with properties {subject:"mailSubject", content:"mailContent" as text, visible:true}

                                set default message format to rich text

          end tell

 

-- Michelle

 

 _______________________________________________
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 App - plain text
      • From: Doug McNutt <email@hidden>
    • Re: Mail App - plain text
      • From: Michelle Steiner <email@hidden>
  • Prev by Date: Re: Mail App - plain text
  • Next by Date: Re: Mail App - plain text
  • Previous by thread: Re: Mail App - plain text
  • Next by thread: Re: Mail App - plain text
  • Index(es):
    • Date
    • Thread