Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Create an email with an attachment



Are you using Tiger?  It is very easy to create an Automator worklfow
where you can compose a new e-mail and automatically supply the
attachment using:

1) Get Specified Finder Items
2) New Mail Message

In the Subject and Message areas, you can also add some default text.


On 6/27/06, Geoff Lilley <email@hidden> wrote:

Hello. This is my first post to the list. I'm a script newbie.

All I want to do is send an email from Mail.app, with an attachment.

The attachment name will change, but not by much.  It will always start with
the words "Detail Summary Report."

This is what I have so far:

property theSubject : "PQMS Report for the Week"
property theBody : "Here is the PQMS Data for the week."
property recipientName : "Geoff Lilley"
property recipientAddress : "email@hidden"
property weeklyReport : "Detail Summary.xls"
tell application "Mail"
 set newMessage to make new outgoing message with properties
{subject:theSubject, content:theBody}
 tell newMessage
 -- Default is false. Determines whether the compose window will
 -- show on the screen or whether it will happen in the background.
 set visible to true
 make new to recipient at end of to recipients with properties
{name:recipientName, address:recipientAddress}
 end tell
 activate
end tell


If it's not asking for the absolute impossible, I want to be able to get the recipient's a name and address from a prompt.

Any ideas would be appreciated.  Thanks.

Geoff Lilley
email@hidden



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list
(email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-users/email@hidden

This email sent to email@hidden


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-users/email@hidden

This email sent to email@hidden
References: 
 >Create an email with an attachment (From: Geoff Lilley <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.