Clean code of user defined scrip and change of recipients

I’d like to send notification to several email addres when new tickets
arrives through mail.
I made first part ( with help of script from RT2 ) and I am able to find
whether incoming ticket is from email or web. This part I put to preliminary
part of user scrip.
In cleaning part I’d like to send emails ( probably with use of ).
But I haven’t find any way how to set recipients and then call ( I
am not perl expert).

Ivan Kuncl