I got some source from here about how to send email using qt's socket. But the code is not sending email, rather it's stucked after connected to smtp server.
My output is like
1
stateChanged QAbstractSocket::HostLookupState
stateChanged QAbstractSocket::ConnectingState
stateChanged QAbstractSocket::ConnectedState
Connected
constructor
2
I have written SMTP code in the past and would recommend not doing it. There is a library called Qxt that has classes designed to send emails (QxtSmtp, QxtMailMessage, and QxtMailAttachment). This library is also built completely on Qt, so you get to use Qt's socket code anyways.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With