This class may be used for sending mail via smtp-server with authorization and with ssl protection or no.
Class consists ofi two data-parts:
1. SmtpAuthData struct which used for smtp server authorizaton;
2. And other class data for Mail
Example for minimal succeed class work
// your email address
data.email = "";
// login for your email account
data.login = "";
// password for auth on email account
data.password = "";
// set up smtp auth account data
// mail to:
QString receivers = "";
// and than send letter
You may attach files to letter, put
absolutefilePath to QStringList and than call function with Letter object:
Class support 5 different encodings:
utf-8, windows-1251, koi8-u, koi8-r and macintosh, set encoding very simple call function with Letter object:
Class support blind carbon copy(Bcc),
Names in the fields may be in non ascii characters, it depends on coding which be setted with Letter::set_encoding("encoding") (windows-1251 default)
If smtp server doesn't support EHLO mode clas try to connect with HELO mode
Update: if you don't have installed openSSL libraries, there a brief instruction:
1. Open Win32 OpenSSL Installation Project page.
2. Download the latest "light" Win32 or Win64 installation package, for example "Win32 OpenSSL v0.9.8l Light".
3. Install it to any location. Ignore "Microsoft Visual C++ 2008 Redistributables" warning (click OK) and select copying OpenSSL DLLs to "The OpenSSL binaries (bin) directory".
4. Copy libeay32.dll and ssleay32.dll from the bin folder to the same place where your QtNetwork4.dll or QtNetworkd4.dll is located.