How to append text to every outgoing e-mail via Applescript Mail rule?

Friends:

I would like to call a script like the following from and Apple Mail rule so that every outgoing email has a unique random serial number added to the end of the message.

set x to {}
repeat (random number from 12 to 14) times
	set end of x to some item of "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"
end repeat
x as text --> "JUEQPJBH", "LFOBPXHJI", "TQRVYJPHFA"

How do I do it?

Thanks amigos,

Migs

Before getting to a mail rule, your random serial number is by no means guaranteed to be unique unless you check against previous ones.

Mail rules are only for incoming emails so I don’t think this is possible.

Didn’t realize the outgoing mails are not susceptible to rules. Thanks amigos.-Migs