Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. SMTP Library for QT5
Forum Updated to NodeBB v4.3 + New Features

SMTP Library for QT5

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 1.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    hkottmann
    wrote on last edited by
    #1

    I need a library for my app to send E-Mails in case of failures, but I was not successful to find anything that is working and I don't want to add a 200M library to my app. I just need to send text messages (no HTML, no attachments, but it should be still actively maintained and support all servers (no authentication, SSL and TLS). I'm really wondering why there is not a such functionality in QT since there is everything that you can dream of implemented in QT (Serialport, Modbus, etc, etc). I've already tried the simple-mail library that you can find on GitHub (https://github.com/cutelyst/simple-mail) and I was able to compile and use this library on my Linux box, but not on Windows, here I was not able to compile and use it. First I've got tons of warning like that during the compiling process:

    C:\Users\kottmann_h\Documents\QT\simple-mail-master\src\emailaddress.cpp:22: warning: 'SimpleMail::EmailAddress::EmailAddress()' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
    EmailAddress::EmailAddress() : d_ptr(new EmailAddressPrivate)

    and at the end tons of linker errors like this:

    C:\Users\kottmann_h\Documents\QT\simple-mail-master\src\emailaddress.cpp:22: error: undefined reference to `__imp__ZTVN10SimpleMail12EmailAddressE'

    The library upon which this library is based on I was able to compile, but it was not working (for at least with smpt.gmail.com):

    https://github.com/bluetiger9/SmtpClient-for-Qt

    Is there somewhere a (small) library for QT that can be easily integrated and fits my (homely) needs that is actively maintained or is there a way to get this simple-mail library to work in Windows?

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      I was able to get "bluetiger" to work on windows with google.

      i installed openSLL from
      http://slproweb.com/products/Win32OpenSSL.html
      (OpenSSL-Win64 in my case )
      I copied
      alt text

      to demo1's build folder near the exe.
      (you can also add the path to Creator or maybe i just needed to reboot for it to find in c:\openSSL)

      in demo1 .pro file
      it says
      win32:CONFIG(release, debug|release): LIBS += -L$$SMTP_LIBRARY_LOCATION/release/ -lSMTPEmail
      else:win32:CONFIG(debug, debug|release): LIBS += -L$$SMTP_LIBRARY_LOCATION/debug/ -lSMTPEmail

      so i added the DLL files to
      alt text

      note: debug OR release sub folder. match how you build the app.

      Then it ran.
      alt text

      However, google blocked my app and
      i had to login it and allow it.

      Then it lists the email in sent
      alt text

      1 Reply Last reply
      4
      • H Offline
        H Offline
        hkottmann
        wrote on last edited by
        #3

        The programmer of simple-mail provided a fix, now it compiles fine. The only thing a had to do additionally was to install openSSL

        1 Reply Last reply
        1

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved