[Newbie] Script to Forward Mail

I’m trying to write a script to forward selected messages to the recipients. This will be for mesages that were mistakenly delivered to a mailbox for spam instead of the actual recipients. Anyone that could give me some advice on what I’ve got? Thanks! [edit for clarity: mail comes through spamsoap server, which delivers mail detected as spam to a mailbox called spambox rather than the mailbox specified by the to: recipient. I want my script to enable me to forward selected messages to the actual to: recipients if I find legit mail in the spam mailbox.]


[This script was automatically tagged for color coded syntax by Convert Script to Markup Code]

Mail gives me an error saying that I have not specified any recipients… Problem with line 6?

I wrote similar script, and have also some stuck. I tried your code with some modifications, maybe this could help you.

tell application “Microsoft Entourage”
set Xmen to “something@something.com” as text
set list_vybrano to selection of application “Microsoft Entourage”
repeat with counter from 1 to number of items of list_vybrano
set rcv to item counter of list_vybrano
set fwd to forward rcv to Xmen without opening window
send fwd
end repeat
end tell