There's about 25 threads on the site that have talked about this, from using sendmail and NET::SMTP to connecting to sockets directly and using MIME::Lite. Many of them are quite excellent. I would recommend using the search box above, and doing some searching. That search will only search subject titles. You can type 'super search' in the search box, and go to a node that will allow searching the bodies of the messages for such information.