hello...
i want to send message by libQxt but i dont know,i need to example . please help me.
Printable View
hello...
i want to send message by libQxt but i dont know,i need to example . please help me.
Construct the mail message, optionally set the user and password, connect to smtp server, send the message and disconnect.
thank's
for example if i want to send mail from xxxxxx@xxxxxx.xxx to xxxxxx@gmail.com how i can do that??
You go to http://doc.libqxt.org/tip/qxtsmtp.html and read the documentation of the QxtSmtp class and find the methods names matching the directions I gave you in the previous post and use them.
this code is work but not send mail why ??Code:
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);
Your host is wrong.
Go to the google gmail help pages and find what their smtp server address is.
i succeeded ,thank tbscope and thank wysota .:D