Using the gmail api
-
I am trying to learn how to send data via the gmail api and I am using this https://github.com/xcoder123/SimpleSmtp_SSL_QT5. but I keep on getting the error Server response code: "530"
Server response: " 530-5.5.1 Authentication Required. Learn more at\r\n530 5.5.1 https://support.google.com/mail/?p=WantAuthError f16sm535193lfc.81 - gsmtp\r\n"
I have scoured the web for various solutions, but none seem to be working, any help will be appreciated. -
Hi
Make sure you have allowed your app in Google. Else it will block your app.
https://support.google.com/accounts/answer/6010255?p=lsa_blocked&hl=en&visit_id=636973346373893130-2204077880&rd=1its off pr default and your app wont be allowed to login.
-
I followed the steps there, but I have sort of a new problem
Server response: " 250-smtp.gmail.com at your service, [176.59.67.47]\r\n250-SIZE 35882577\r\n250-8BITMIME\r\n250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH\r\n250-ENHANCEDSTATUSCODES\r\n250-PIPELINING\r\n250-CHUNKING\r\n250 SMTPUTF8\r\n"
qt.network.ssl: QSslSocket::startClientEncryption: cannot start handshake on non-plain connection
"Unknown error" -
Hi
It sounds like this bug
https://bugreports.qt.io/browse/QTBUG-59348
but i dont know SimpleSmtp_SSL_QT5 source so not sure its the same.However, if the goal is just to send email.
I just tested with
https://github.com/bluetiger9/SmtpClient-for-Qt
and it did send an email after allowing it in google.
The page says Qt4 but I just compiled the lib with Qt5.13 with no errors.
Then used Demo1 to send mail.
Make sure to copy the LIB and DLL to the Demo1 build folder so it can find them.