cutelyst / simple-mail

An SMTP library written in C++ for Qt. Allows applications to send emails (MIME with text, html, attachments, inline files, etc.) via SMTP. Supports SSL and SMTP authentication.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Critical error detected

Sodininkas opened this issue · comments

Hello, writing code like this:

using namespace SimpleMail;

SimpleMail::Sender smtp("smtp.gmail.com", 465, SimpleMail::Sender::SslConnection);
smtp.setUser("mail@gmail.com");
smtp.setPassword("password");
MimeMessage message;
message.setSender(EmailAddress("mail@gmail.com", "username"));
message.addTo(EmailAddress("mail@gmail.com", "username"));
message.setSubject("SmtpClient for Qt - Demo");
if (!smtp.sendMail(message)) {
	qDebug() << "Failed to send mail!" << smtp.lastError();
}
smtp.quit();

And always getting Critical error detected c0000374 - C++. Email is send successful, but after that error occurs. Where could problem be?

Hard to tell without a backtrace.