Need a Little Help.......

ok, got a pretty easy one but i am completely new to scripting.

All i want to do is run an automator application i have created whenever i hit “Send mail” in mail

Basically i have to log in to a vpn client to send with this server, the automator app sends the mail, logs in, pauses for the mail to be sent, and then closes the client…i just need to have that run whenever i hit send mail…PLEASE help me

If you have the Automator action saved as an application. all you need is

activate (*name of the application*)
delay (*the amount of time you want to delay*)

Hope that helps!