If all you want to do is -send- an e-mail from your application, it is very easy to use QDesktopServices:

Qt Code:
  1. QString strMailTo( "mailto:someone@someAddress.com?subject='My E-mail example'&body=" );
  2. strMailTo += "Hi! This is the body of the e-mail";
  3. bool bResult = QDesktopServices::openUrl( QUrl( strMailTo ) );
To copy to clipboard, switch view to plain text mode 

The QUrl constructor will convert the "strMailTo" string into a proper URL (that is, replace spaces by %20%, and so forth). The Boolean result tells you whether the call succeeded or not.

Forget all this stuff about sockets, TCP, SMTP, and so on.

David