bluetiger9 / SmtpClient-for-Qt

An SMTP Client writen in C++ for Qt. Allows applications to send emails (MIME with text, html, attachments, inline files, etc.) via SMTP. Supports SSL and SMTP authentication.
https://github.com/bluetiger9/SmtpClient-for-Qt/wiki
GNU Lesser General Public License v2.1
449 stars 226 forks source link

sendMail not working! help #116

Closed bugaenko-cyber closed 2 years ago

bugaenko-cyber commented 2 years ago

Qt 5.15.2 MinGw 8.1 32-bit

.......... [Socket] OUT: "\r\n." [Socket] IN: "554-Transaction failed\r\n" [Socket] IN: "554-Reject due to policy restrictions.\r\n" [Socket] IN: "554 For explanation visit https://www.ionos.com/help/index.php?id=2425&c=hd\r\n" SMTP - Failed to send mail! [SmtpClient] State: DisconnectingState [Socket] OUT: "QUIT"

passed the connection login passes crashes while sending a message

and the server works with other programs 100%. I'm using a TLS connection.

what's wrong ?

bluetiger9 commented 2 years ago

Looks like the SMTP server is rejecting your email, because of some policy restrictions.

The link from the error message suggest you should contact them:

554 Reject due to policy restrictions

Problem: The email was rejected as it violates IONOS policy. The sending server is mostly sending spam messages.

Solution: Contact us IONOS to have the facts of the case examined.

bugaenko-cyber commented 2 years ago

but still it is not so!

in c# using the MimeKit library everything works with the same parameters

I mean, it's in the code, it happened when the server started using tls

bluetiger9 commented 2 years ago

@bugaenko-cyber, from the error message it is pretty hard to tell why the IONOS mail server is rejecting the email. Looks like you already have the full SMTP transcript in the logs. I think you should use this logs to ask IONOS about the exact rejection reason.

bugaenko-cyber commented 2 years ago

I'll look now and let you know

bugaenko-cyber commented 2 years ago

By the way ! will not work at all without this, since 5.15.2 there is no support for QStringEncoder MimePart::writeContent(device, \*QStringEncoder(this->cCharset.toStdString().c_str()).encode(text)*\text.toUtf8());

maybe it's because of this

ps while the logs on the server are not available (