Combining two scripts failure

Hi i hope i have the correct location for my problem.
It is a easy problem but a strange one.

I have two scripts that work fine when i run the separately but fail when i put them together.
A send email scrip that looks like this and works great from the editor.


tell application "Mail"
	set newMessage to make new outgoing message
	tell newMessage
		make new to recipient at end of to recipients with properties {name:"artattack2go", address:"admin@artattack2go.com"}
		set sender to "marcel.koert@melomar.biz"
		set subject to "test"
		set content to "test"
	end tell
	send newMessage
	
end tell

And a script that runs after a email comes in and tells me who it is from.


on perform_mail_action(info)
	tell application "Mail"
		set the_messages to |SelectedMessages| of info
		repeat with a_message in the_messages
			set the_sender to extract name from sender of a_message
				say "Mail from " & the_sender
		end repeat
	end tell
end perform_mail_action

When i put them together i get the messages that a email came in from somebody but it does not send out the email.


on perform_mail_action(info)
	tell application "Mail"
		set the_messages to |SelectedMessages| of info
		repeat with a_message in the_messages
			set the_sender to extract name from sender of a_message
			say "Mail from " & the_sender
			set newMessage to make new outgoing message
			tell newMessage
				make new to recipient at end of to recipients with properties {name:"artattack2go", address:"admin@artattack2go.com"}
				set sender to "marcel.koert@melomar.biz"
				set subject to "test"
				set content to "test"
			end tell
			send newMessage
			
		end repeat
	end tell
end perform_mail_action

Can anybody tell me what i am doing wrong

Thanks Marcel Koert

Hi,

in Leopard (and presumably Snow Leopard) the function to send a mail from a rule is broken.