On 2006-07-20, at 22:54, Michael Heth wrote:
is there a script out there that would let me select all the
messages in a particular inbox, make a list of who I received the
mesaages from, make the list unique (no duplicates) and then create
an email with all of the addresses in the list in the Bcc field?
This might get you started (I haven't tested it), and it keeps the
thread vaguely BBEdit-related. You would probably get more help on
the applescript mailing list, although you'd also get lots of
unrelated dissertations on email clients, applescript failings, why
BBEdit or Mail is or isn't cool, and so on. Nothing like that from
me... :-)
--
set senders_list to ""
tell application "Mail"
tell front message viewer
set mbs to selected mailboxes
repeat with mb in mbs
repeat with m in (get every message of mb)
set senders_list to sender of m & return &
senders_list
end repeat
end repeat
end tell
end tell
tell application "BBEdit"
make new document
tell window 1
tell text 1
set contents to senders_list
set outputOptions to {replacing target:true}
set sortOptions to {}
sort lines sorting options sortOptions output options
outputOptions
set matchOptions to {match mode:leaving_one}
set outputOptions to {deleting duplicates:true}
process duplicate lines duplicates options matchOptions output
options outputOptions
end tell
end tell
set senders_list to text 1 of window 1
end tell
tell application "Mail"
set newMessage to make new outgoing message with properties
{subject:"subject", content:"body" & return & return}
repeat with i in paragraphs of senders_list
tell newMessage
set visible to true
make new bcc recipient at end of bcc recipients with properties
{address:i}
end tell
end repeat
end tell
--
--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to: <[EMAIL PROTECTED]>