tell application "Mail"
set theSelectedMessages to selection
repeat with theMessage in theSelectedMessages
set theMailbox to "[Gmail]/Sent Mail"
tell application "Mail"
move the theMessage to mailbox theMailbox of account "Gmail IMAP"
end tell
end repeat
end tell
To use it, just change the account name Gmail IMAP to your account's name, and the folder from [Gmail]/Sent Mail to your IMAP folder's name. (As you can tell, I used this script to upload messages via GMail IMAP.) You can then save the script to your user's Library » Scripts » Applications » Mail folder and run it from the Scripts menu within Mail.
[robg adds: I haven't tested this one.]

