Re: Email Mail Merge
Re: Email Mail Merge
- Subject: Re: Email Mail Merge
- From: Dave Balderstone <email@hidden>
- Date: Mon, 24 Jul 2006 17:16:23 -0600
On 24-Jul-06, at 4:53 PM, Stockly, Ed wrote:
I have a need for a fairly basic mail merge script to work with
Address Book and Mail.
I need to send an individual message to every person in an address
book group, using their first and last names.
I've just started toying with Mail, I hoped it would be as simple as
make new message at beginning with properties {to: "email@hidden";
contents "Hello World"; subject: "Foo Bar"; attachments : {list of
file refs}
send message 1
So, before I start reinventing the wheel I'm wondering if anyone
else has covered this ground before.
Thanks
Here's the routine I use in an ASStudio app for our reporterss to
file their pictures (Note: "ToAddress is a global as the app always
send to the same recipient):
---------------
on SendPic(theMessage, the_file, the_sender, theNewName)
tell application "Mail"
activate
try
set the new_message to ¬
(make new outgoing message with properties ¬
{visible:true, content:theMessage, subject:the_sender})
tell the new_message
make new to recipient at end of to recipients with properties
{address:ToAddress}
tell content
make new attachment with properties ¬
{file name:the_file} at before the first character
end tell
end tell
end try
send the new_message
end tell
end SendPic
-----------------
Hope that helps.
djb
_______________________________________________
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