• 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
Sending mail with attachment
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Sending mail with attachment


  • Subject: Sending mail with attachment
  • From: Giampiero Cairo <email@hidden>
  • Date: Fri, 19 Nov 2004 10:02:07 +0100

Hi All,
I have a trouble with the following script:

tell application "Mail"
activate
set newMessage to make new outgoing message with properties
{subject:"xxxxxx", content:"xxxxxxxx" & return & return}
tell newMessage
set visible to true
make new to recipient at end of to recipients with properties
{address: email@hidden}
tell content
make new attachment with properties {file name:"Path"} at after
the last paragraph
end tell
end tell
end tell



where Path is "/MyDocuments/MyAttachment/Test.doc".

If this file "Test.doc" is located on my Mac all works fine but if I choose
a file on an other Macintosh (for example on my Server) and the path become:


Path = "/Server/MyDocServer/MyAttachServer/TestServer.doc"

my script fails: the application Mail opens but the file TestServer.doc is
not attached to the email.


Where is my error ?

Any ideas ?

Thanks in advance.

Giampiero Cairo

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: [ANN] New comprehensive AppleScript book
  • Next by Date: Re: Deleting last item of a List
  • Previous by thread: Re: Deleting last item of a List
  • Next by thread: Making a list of IPs that try relaying on my Postfix server
  • Index(es):
    • Date
    • Thread