If you have the ability to spend money on this gig, you might want to look at
Sendmail by Indigo Star. I used this at an ISP that I worked at and it did the job. One licencse covers as many instances you want on a single server. Just put the .exe in your cgi-bin dir and it works. Has a small config file and a log file (for each instance). They even have perl examples on the site. Check it out.
Ryan Briones