Closed joshorenberg closed 1 year ago
Note, addPart()
transfers ownership (should be documented!). You mustn't do this with stack variables. Use:
MimeText * text = new MimeText;
...
message.addPart(text);
@ghorwin, addPart()
does not actually takes ownership of part you're adding. It just expects a MimePart *
pointer, and the object must remain valid unit you call the sendMail()
method. This works with stack variables too, as long you're calling the sendMail()
within the same method. Thanks!
Hi the client is crashing for me on the step text.setText(string); Application output says: Critical error detected c0000374
Here is a backtrace:
Here is the code as borrowed from the example:
I am running Qt Creator based on Qt 5.15.2. Thanks!