Recommended way to run is: Smtp *stmp = new Smtp(<vars>). If you're using it to send large mails then look at running it in an event loop and connecting the finished() signal to the quit() slot.
nicholassmith/Qt-SMTP
A Qt SMTP helper class with SMTP authentication and multiple recipients. This is not a full featured library, it's useful for when you need the ability to send emails without requiring a full featured library like libEtPan.
C++