How To Send File with mail, with SMTP client for Qt 5.0



  • Hello guys.
    I using Qt 5.7.0
    I want To Send file via mail.
    i download https://morf.lv/adding-file-attachments-to-smtp-client-for-qt5 but i have many errors:

    qt.network.ssl: QSslSocket: cannot call unresolved function d2i_DHparams
    qt.network.ssl: QSslSocket: cannot call unresolved function DH_free
    qt.network.ssl: QSslSocket: cannot call unresolved function d2i_DHparams
    qt.network.ssl: QSslSocket: cannot call unresolved function DH_free
    No attachments found
    stateChanged QAbstractSocket::HostLookupState
    stateChanged QAbstractSocket::ConnectingState
    stateChanged QAbstractSocket::ConnectedState
    qt.network.ssl: QSslSocket: cannot call unresolved function d2i_DHparams
    qt.network.ssl: QSslSocket: cannot call unresolved function DH_free
    qt.network.ssl: QSslSocket: cannot call unresolved function SSLv23_client_method
    qt.network.ssl: QSslSocket: cannot call unresolved function SSL_CTX_new
    qt.network.ssl: QSslSocket: cannot call unresolved function SSL_library_init
    qt.network.ssl: QSslSocket: cannot call unresolved function ERR_get_error
    error QAbstractSocket::SocketError(21)
    qt.network.ssl: QSslSocket: cannot call unresolved function ERR_get_error
    error QAbstractSocket::SocketError(20)
    Connected
    error QAbstractSocket::RemoteHostClosedError
    stateChanged QAbstractSocket::ClosingState
    stateChanged QAbstractSocket::UnconnectedState
    disconneted
    error "The remote host closed the connection"


  • Moderators

    Hi,

    did you use

    QT += network
    

    in you or file?

    Eddy



  • @Eddy
    yeap


  • Moderators

    When I follow the link you gave us I find on this page:

    To run the exectutable you have to install Qt5, Microsoft Visual C++ redistributables and OpenSSL on your computer.
    To compile you just need OpenSSL and Qt5!
    

    did you meet this requirements?

    BTW what environment are you using?

    Eddy



  • @Eddy said in How To Send File with mail, with SMTP client for Qt 5.0:

    When I follow the link you gave us I find on this page:

    To run the exectutable you have to install Qt5, Microsoft Visual C++ redistributables and OpenSSL on your computer.
    To compile you just need OpenSSL and Qt5!
    

    did you meet this requirements?

    BTW what environment are you using?

    Eddy

    jast i reliase this project Other people can use it?


  • Moderators

    jast i reliase this project Other people can use it?
    

    I don't understand exactly what you're saying.

    As I look in the webpage of the code, I see other people have the same problem as you and the writer of the code answered them.
    Maybe you will get your answers directly from the author there.

    Eddy



  • @Eddy said in How To Send File with mail, with SMTP client for Qt 5.0:

    When I follow the link you gave us I find on this page:
    To run the exectutable you have to install Qt5, Microsoft Visual C++ redistributables and OpenSSL on your computer.
    To compile you just need OpenSSL and Qt5!

    did you meet this requirements?
    BTW what environment are you using?
    Eddy

    No i do not meet this requirements.
    i dont need TLS/SSL.
    i want file attachment: this


  • Lifetime Qt Champion

    Hi,

    Unless you plan to connect to an unsecured SMTP server (which would be a bad idea), you need OpenSSL.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.