C++ code for sending email. fork from http://sourceforge.net/projects/jwsmtp/