I have to agree
dave0, I have spent a lot of time over the last 20 years or so writing email clients. Originally in C, then C++ and, horror of horrors, in VB. But the most trouble free has been Perl with
Net::SMTP,
Net::POP3 and
MIME::Tools. About a year ago I took all the email related RFC's, plus all the things like the DBJ documents and bound them into a book about 40mm thick. With all of that as reference material, and the Perl modules, I haven't found a thing I can't handle.
Good luck with your refactoring efforts, I, for one, look forward to seeing the results and the extended lifetime of a great family of modules.
jdtoronto