Applescript to create a mail message

  • Thread starter Harinder S. Bawa
  • Start date
H

Harinder S. Bawa

Hi. I am a newb regarding Applescript. I just need a script that will
allow me to create 10 messages to 10 different people with 10 different
attachments. The people stay the same as do the attachment names. Can
anyone start me out. I think I can tweak it afterwards. Thanks.
 
B

Barry Wainwright

Are you trying to say you want an identical message with an attachment to go
out to ten different people, so that each person receives a separate copy of
the message? - i.e. 10 messages total

Or, you want 10 people to each receive 10 messages with an attachment - i.e.
100 messages?
 
J

Justin

Hi Barry,

I have roughly the same query - I wish to send an identical message
WITHOUT an attachment but with an identical subject line to a large
number of single e-mail addresses so that each person recieves a single
e-mail from me without the message being 'cc'd' or 'bcc'd' to any other
person. If you can help thank you for your time. My e-mail address is:

[email protected]

hank you again.

Justin
 
H

Harinder S. Bawa

Barry,

Identical message body, different attachment to ten people repetitively!

Recipient1 gets attachment1
Recipient2 gets attachment2
etc.

Thanks for your help.

Harinder
 
B

Barry Wainwright

OK, compose your message, put all the recipients in the 'to' line, then run
this script:

<http://tinyurl.com/3pjuy>

If that URL doesn't work properly, here is the script in full:

-- Send Separate Messages v1.0.0
-- © Barry Wainwright 8th December 2004
-- An Applescript for Microsoft Entourage
-- Will take the frontmost window, and create a new
-- duplicate message for each recipient of that window

tell application "Microsoft Entourage"
set aMess to front window
if class of aMess is draft window then
tell aMess to set {theSubject, theContent, theRecipients} to
{subject, content, to recipients}
set {oldTIDs, AppleScript's text item delimiters} to {AppleScript's
text item delimiters, ","}
set theRecipients to text items of theRecipients
repeat with aRecipient in theRecipients
make new outgoing message at end of folder id 2 with properties
{subject:theSubject, content:theContent, recipient:aRecipient}
end repeat
delete aMess
else
display dialog "No Draft Message Open!" buttons {"Stop"} default
button 1 with icon stop giving up after 5
end if
end tell

Save the script as a compiled script & put it in the ŒEntourage Script Menu
Items¹ folder in your ŒMicrosoft User Data¹ folder. The script can be
manually run from the menu.
 
B

Barry Wainwright

I should advise that recent version of entourage may throw up a warning
dialog if you try to send a message by script. This can be disabled in the
security preferences.

--
Barry Wainwright
Microsoft MVP (see http://mvp.support.microsoft.com for details)
Seen the All-New Entourage Help Pages? - Check them out:
<http://www.entourage.mvps.org/>



From: Barry Wainwright <[email protected]>
Newsgroups: microsoft.public.mac.office.entourage
Date: Wed, 08 Dec 2004 20:38:02 +0000
Subject: Re: Applescript to create a mail message

OK, compose your message, put all the recipients in the 'to' line, then run
this script:

<http://tinyurl.com/3pjuy>

If that URL doesn't work properly, here is the script in full:

-- Send Separate Messages v1.0.0
-- © Barry Wainwright 8th December 2004
-- An Applescript for Microsoft Entourage
-- Will take the frontmost window, and create a new
-- duplicate message for each recipient of that window

tell application "Microsoft Entourage"
set aMess to front window
if class of aMess is draft window then
tell aMess to set {theSubject, theContent, theRecipients} to
{subject, content, to recipients}
set {oldTIDs, AppleScript's text item delimiters} to {AppleScript's
text item delimiters, ","}
set theRecipients to text items of theRecipients
repeat with aRecipient in theRecipients
make new outgoing message at end of folder id 2 with properties
{subject:theSubject, content:theContent, recipient:aRecipient}
end repeat
delete aMess
else
display dialog "No Draft Message Open!" buttons {"Stop"} default
button 1 with icon stop giving up after 5
end if
end tell

Save the script as a compiled script & put it in the ŒEntourage Script Menu
Items¹ folder in your ŒMicrosoft User Data¹ folder. The script can be
manually run from the menu.
 
J

Jim Karpen-PPC mag

Justin wrote on 12/8/04 8:34 AM
Hi Barry,

I have roughly the same query - I wish to send an identical message
WITHOUT an attachment but with an identical subject line to a large
number of single e-mail addresses so that each person recieves a single
e-mail from me without the message being 'cc'd' or 'bcc'd' to any other
person. If you can help thank you for your time. My e-mail address is:


I've done this using Word's Data Merge Manager. I sent individual e-mails to
a list of recipients in an Excel spreadsheet. Each e-mail was individually
addressed and used the person's name in the salutation.

Jim
 
Top