Hi AwolAdam,
Sorry for the delay in answering. After your reply I began to do more testing.
I was able to get it to work the other night but it seems to be very unstable. Tonight I used the same workflow and only got it to work once out of about 15 tries. Part of the problem seems to be that you do need to create a new outgoing email message within the workflow to avoid the error message. However, even when the error message does not appear the workflow seemed to be hit or miss in generating the multiple email messages.
I did a search in this forum and found a discussion that suggests that this is not the first time this problem has been noted.
http://discussions.apple.com/thread.jspa?messageID=700363򪿋
Action 1: New Mail Message as described in the requirements with the subject and content filled in.
Action 2: Get Specified Finder Items with the files to be attached
Action 3: Add Attachments to Front Message
Action 4: Get Specified Address Book Items with one of my Address Book Groups specified
Action 5: Group Mailer with Greeting selected
I have also begun working on an AppleScript that does essentially the same thing as the Automator Workflow. Right now the details for the AppleScript must be specified in the properties at the top of the script. I am planning to integrate this into an Automator Workflow and gather much of that info from the workflow. Stay tuned!
click here to
open this script in your editor
<pre style="font-family: 'Monaco', 'Courier New', Courier, monospace; overflow:auto; color: #222; background: #DDD; padding: 0.2em; font-size: 10px; width:400px">property GreetingWanted : true
property theGreeting : "Dear "
property FirstNameOnly : true
property LastNameOnly : false
property FirstLastName : false
property LastFirstName : false
property theSubject : "Group Mailing trials"
property theContent : "This is a trial message."
property FileAttached : true
property theAttachment : "Macintosh HD:Users:djgreggpb:Desktop:1518.jpg"
tell application "Address Book"
set theGroups to name of groups
set theEmailGroup to (choose from list theGroups) as text
set FirstNames to first name of people of group theEmailGroup
set LastNames to last name of people of group theEmailGroup
set EmailAddresses to value of email 1 of people of group theEmailGroup
end tell
tell application "Mail"
activate
repeat with i from 1 to count of EmailAddresses
if GreetingWanted then
if FirstNameOnly then set theCompleteGreeting to theGreeting & item i of FirstNames
if LastNameOnly then set theCompleteGreeting to theGreeting & item i of LastNames
if FirstLastName then set theCompleteGreeting to theGreeting & item i of FirstNames & space & item i of LastNames
if LastFirstName then set theCompleteGreeting to theGreeting & item i of LastNames & space & item i of FirstNames
set theCompleteContent to theCompleteGreeting & "," & return & return & theContent & return
end if
set email to make new outgoing message with properties {subject:theSubject, content:theCompleteContent, sender:"djgregg@telus.net", visible:true}
tell email to make new to recipient with properties {address:item i of EmailAddresses}
if FileAttached then
my MoveToEndOfContent()
tell email to make new attachment with properties {file name:theAttachment as alias}
end if
end repeat
end tell
on MoveToEndOfContent()
tell application "System Events"
tell process "Mail"
keystroke "a" using command down
key code 124 -- right arrow
keystroke return
keystroke return
end tell
end tell
end MoveToEndOfContent</pre>
PowerBook 12" Mac OS X (10.4.8)