Hi,
If you could tell us the exact requirement it would be hepful.
If hope you are looking for a perl script. I already have a perl script that could take from address , subject , mail body(a file) as arguments and send mail through a smtp server(If need I coud setup a smtp serer using postfix/sendmail . If needed I could make changes in script such that it could take the to addresses also as arguments.
But your requirement is to modify your existing scritpt, I could do that also
Please let me know if you are interested
Regards,
Aravinth