Hi all,
I’ve already got a set of draft emails I want to add to a new email, and I’m having issues finding the draft email by its ID. This is what I’ve got so far.
set returnMailSubject to "Actions List Request on " & date string of (current date) & " @ " & time string of (current date)
set returnMailContent to "Dear user," & return & return & ¬
"Thanks for using the Actions List service." & return & return & ¬
"Please find attached all email containing the actions for the individuals you requested"
--This is the email containing the attachments
set newMessage to make new outgoing message with properties {sender:returnMailSender, subject:returnMailSubject, content:returnMailContent}
tell newMessage
make new to recipient at end of to recipients with properties {address:returnMailRecipient}
--Go through the list if draft ID's and attach them to the above message
repeat with attachmentCount from 1 to (count of draftEmailIDs)
set theAttachment to (message whose id is (item attachmentCount of draftEmailIDs))
make new attachment with properties {file name:theAttachment} at after last word of last paragraph
end repeat
--end tell
end tell
The problem I come up against appear as the following message:
Can't get message whose id = item 1 of {59, 60, 61
Any ideas?