cdevine - in your Perl script you'll find the smtp code. The people here will need to see those sections of code, and the names of the modules they come from, before they can help you.
Mike
When working on any project the value of other people is exactly that - they are other people, with views that don't necessarily match yours. This mismatch, between their views and the view you've been contentedly assuming is right, is where that value lies.