Closed joejond closed 5 years ago
I think, you could just skip the login step:
if (!smtp.connectToHost()) {
qDebug() << "Failed to connect to host!" << endl;
return -1;
}
// if (!smtp.login()) {
// qDebug() << "Failed to login!" << endl;
// return -2;
// }
if (!smtp.sendMail(message)) {
qDebug() << "Failed to send mail!" << endl;
return -3;
}
(https://github.com/bluetiger9/SmtpClient-for-Qt/blob/v1.1/demos/demo1/demo1.cpp)
hi @bluetiger9 thanks for advice. yes it solve right now. case close.
Hi, Im tryng using this library to send email to port 25 and without using Username and Password. But after compile always return "login Failed"
SmtpClient smtp("mail.host.com", 25, SmtpClient::TcpConnection); smtp.setUser(""); smtp.setPassword("");
please give advice