on perform_mail_action(CreateTodo)
tell application "Mail"
set theSelectedMessages to |SelectedMessages| of CreateTodo
set theRule to |Rule| of CreateTodo
repeat with a from 1 to count theSelectedMessages
set fromMsg to (sender of thisMessage as string)
set subjMsg to (subject of thisMessage as string)
set todoMsg to fromMsg & subjMsg
tell application "iCal"
tell calendar "Mail To Do"
set theDueDate to (current date)
make new todo at end with properties {summary:todoMsg, due date:theDueDate}
end tell
end tell
end repeat
end tell
end perform_mail_action