Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Qt cannot send email

Tags:

email

qt

qt4

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 
like image 767
Dewsworld Avatar asked Feb 17 '26 14:02

Dewsworld


1 Answers

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.

like image 92
Keith Avatar answered Feb 20 '26 02:02

Keith



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!