Mail->setSender(From->text());
Mail->setSubject(Subject->text());
Mail->setBody(message->toPlainText());
Mail->addRecipient("mohammd.lbdl@gmail.com");
QHash<QString,QString> headers;
headers.insert("MIME-Version","1.0");
headers.insert("Content-type","text/html; charset=utf-8");
headers.insert("from","al-mhawer.com");
Mail->setExtraHeaders(headers);
smtp->connectToHost("gmail.com");
smtp->send(*Mail);
Mail->setSender(From->text());
Mail->setSubject(Subject->text());
Mail->setBody(message->toPlainText());
Mail->addRecipient("mohammd.lbdl@gmail.com");
QHash<QString,QString> headers;
headers.insert("MIME-Version","1.0");
headers.insert("Content-type","text/html; charset=utf-8");
headers.insert("from","al-mhawer.com");
Mail->setExtraHeaders(headers);
smtp->connectToHost("gmail.com");
smtp->send(*Mail);
To copy to clipboard, switch view to plain text mode
this code is work but not send mail why ??
Bookmarks