• 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 Mail.app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding an attachment to Mail.app


  • Subject: Re: Adding an attachment to Mail.app
  • From: John Delacour <email@hidden>
  • Date: Fri, 18 Apr 2003 13:04:42 +0100
  • Mac-eudora-version: 6.0a15

At 3:04 pm +0200 17/4/03, Thorsten Lemke wrote:

Why does this script not work?

... set the new_attachment to make new attachment with properties... {file name:x}

Because 'attachment' in just something they've thrown into the aete because it happened to be lying around. So far as I can tell (and I'd be delighted to be corrected) it has absolutely no connexion with "attachment" in the sense that the user of a mail agent would expect it to have. The same thing is hanging around in all cocoa apps (eg. TextEdit)

'attachment' is in the Text Suite, so by rights one would presumably make on oe these at the end of the content of the message, but the line will give an error, so far as I can see, whatever you write.

It's also not made clear in the dictionary whether the 'file name' property of this elusive attachment should be a Mac pathname or a UNIX pathname. TextEdit want UNIX pathnames, but doesn't tell you either.


tell app "Mail"
set |message| to a reference to outgoing message
set |.| to a reference to end of outgoing messages
activate
set p to {visible:true, subject:"Test", content:"hello"}
set to1 to {name:"test", address:"email@hidden"}
set att1 to {file name:"dx:users:jd:test"}
set m to make |message| at |.| with properties p
tell m
make to recipient at end with properties to1
try
set e to "no error"
make attachment at end with properties att1
on error e
end try
--save
-- -- or
--send
end
end
e
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Adding an attachment to Mail.app (From: email@hidden (Thorsten Lemke))

  • Prev by Date: Re: Get all the ranges of a Excel spreadsheet
  • Next by Date: Re: (OT ?) Some questions about Eudora
  • Previous by thread: Adding an attachment to Mail.app
  • Next by thread: Newbie Script Error - Help?
  • Index(es):
    • Date
    • Thread