Closed opengpu closed 2 years ago
If you create SmtpClient instance in another thread and try to send email in that thread, it works. Otherwise, it doesn't because some QSslSocket signaling thread issues that I cannot remember.
Doing all the interaction with a SmtpClient from the same thread should work. This includes creating the object, and calling the connectToHost(), login(), sendMail(), quit() and waitFor...() method from the same thread.
So, to delegate email sending to a different thread, I would recommend moving all interactions to a new thread. Calling just the sendMail() may not work reliably.
is there any demo shows that SendEmail in another thread?