Skip to content

Google now requires TLS minimum. Segfault on erroneous deleteLater() call #5

@lpds-tarvos

Description

@lpds-tarvos

First off, excellent library very straight forward and I got it to work in no time! Here are a few tweaks I did have to make incase anyone else has problems.

ISSUE 1: TLS min requirements
add the following statement on line 167:

socket->setProtocol(QSsl::TlsV1_0OrLater);

socket->startClientEncryption();
if(!socket->waitForEncrypted(timeout))
{
qDebug() << socket->errorString();
state = Close;
}
................................................................
ISSUE 2: You may have to adjust your gmail account settings to allow insecure apps to login on your account. Also 2 factor auth must be disabled in order for it to work
................................................................
ISSUE 3:
On line 251 you call deleteLater() on the MainWindow object itself causing a segfault. This could also be related to the the function that looks a bit iffy in MainWindow::sendMail. At the very least its a memory leak.

Make Smtp a class member variable and use it as a stack allocated object rather than a heap allocated one. Then you wont have to worry about the dangling pointer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions