• 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: Adding an attachment to an email
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding an attachment to an email


  • Subject: Re: Adding an attachment to an email
  • From: Barry Wainwright <email@hidden>
  • Date: Fri, 09 May 2008 16:57:13 +0100


On 9 May 2008, at 15:49, Peter Hudson wrote:

I generate a new email with subject line, content  and addressee as follows :-

set add to "email@hidden"
set subj to "Return Journey"
set cont to "The best way Home"


tell application "Mail"
activate
GetURL ("mailto:" & add & "?subject=" & subj & "&body=" & cont)


end tell


How do I now attach a zip file located on my desktop to this email ?

Cheers 

Peter

tell application "Mail"
set mySub to "message subject"
set theBody to "message body"
set toRecip to {name:"Fred Flintstone", address:"email@hidden"}
set theFile to choose file
set theMessage to make new outgoing message with properties {subject:mySub, content:theBody}
make new to recipient at end of theMessage with properties toRecip
make new attachment with properties {file name:theFile} at end of theMessage
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: 
 >Adding an attachment to an email (From: Peter Hudson <email@hidden>)

  • Prev by Date: Re: keystroke - cancel modifiers?
  • Next by Date: Re: ASKInitialize(); and Code
  • Previous by thread: Adding an attachment to an email
  • Next by thread: iChat and Applescript
  • Index(es):
    • Date
    • Thread