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. How to send email using Qt 5.5.1
Forum Updated to NodeBB v4.3 + New Features

How to send email using Qt 5.5.1

Scheduled Pinned Locked Moved Unsolved General and Desktop
26 Posts 6 Posters 18.1k 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.
  • V VRonin
    25 Aug 2016, 11:51

    Depends on what service your mail is based on.

    • Microsoft Exchange -> The API is proprietary so the only method I know of is using C++/CLI (so the whole .Net framework stuff)

    • SMTP -> libcurl is probably the most popular library

    You can still handle it all manually via QTcpSocket however.

    Honourable mention, even if it's not so popular: https://www.vmime.org/

    J Offline
    J Offline
    John_38
    wrote on 25 Aug 2016, 11:56 last edited by
    #3

    @VRonin Hi ! :)
    Thanks to your answer.
    I want SMTP if it's possible.

    John

    1 Reply Last reply
    0
    • V Offline
      V Offline
      VRonin
      wrote on 25 Aug 2016, 11:56 last edited by
      #4

      I edited my answer too late, sorry. see above

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      J 1 Reply Last reply 25 Aug 2016, 12:03
      0
      • V VRonin
        25 Aug 2016, 11:56

        I edited my answer too late, sorry. see above

        J Offline
        J Offline
        John_38
        wrote on 25 Aug 2016, 12:03 last edited by
        #5

        @VRonin Can you tell me how to configure and use this ?
        I have read tutorial but I dont know how to put all folder and how to compile.
        Can you help me ? :/
        Thank !!

        1 Reply Last reply
        0
        • V Offline
          V Offline
          VRonin
          wrote on 25 Aug 2016, 12:08 last edited by
          #6

          To build libcurl you can use CMake
          Example of email with libcurl: https://curl.haxx.se/libcurl/c/smtp-ssl.html
          How to integrate libcurl in Qt Creator: http://doc.qt.io/qt-5/third-party-libraries.html

          "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
          ~Napoleon Bonaparte

          On a crusade to banish setIndexWidget() from the holy land of Qt

          1 Reply Last reply
          1
          • R Offline
            R Offline
            raven-worx
            Moderators
            wrote on 25 Aug 2016, 13:01 last edited by
            #7

            easiest would be to use a already existing solution.
            like this one - drawback is that it was written for Qt4. So it may not compile for Qt5 without some modifications.... i don't know.
            Or this one for Qt5.

            Worth to check at least.

            --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
            If you have a question please use the forum so others can benefit from the solution in the future

            J 1 Reply Last reply 25 Aug 2016, 13:41
            1
            • R raven-worx
              25 Aug 2016, 13:01

              easiest would be to use a already existing solution.
              like this one - drawback is that it was written for Qt4. So it may not compile for Qt5 without some modifications.... i don't know.
              Or this one for Qt5.

              Worth to check at least.

              J Offline
              J Offline
              John_38
              wrote on 25 Aug 2016, 13:41 last edited by
              #8

              @raven-worx said in How to send email using Qt 5.5.1:

              easiest would be to use a already existing solution.
              like this one - drawback is that it was written for Qt4. So it may not compile for Qt5 without some modifications.... i don't know.
              Or this one for Qt5.

              Worth to check at least.

              Thanks for your feedback.
              I have tested for Qt5.
              After compilation I have this error.
              http://prntscr.com/ca9fjp
              I need install OpenSSL ?

              R 1 Reply Last reply 25 Aug 2016, 13:43
              0
              • J John_38
                25 Aug 2016, 13:41

                @raven-worx said in How to send email using Qt 5.5.1:

                easiest would be to use a already existing solution.
                like this one - drawback is that it was written for Qt4. So it may not compile for Qt5 without some modifications.... i don't know.
                Or this one for Qt5.

                Worth to check at least.

                Thanks for your feedback.
                I have tested for Qt5.
                After compilation I have this error.
                http://prntscr.com/ca9fjp
                I need install OpenSSL ?

                R Offline
                R Offline
                raven-worx
                Moderators
                wrote on 25 Aug 2016, 13:43 last edited by
                #9

                @John_38 said in How to send email using Qt 5.5.1:

                I need install OpenSSL ?

                yes

                --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                If you have a question please use the forum so others can benefit from the solution in the future

                J 1 Reply Last reply 26 Aug 2016, 12:15
                1
                • R raven-worx
                  25 Aug 2016, 13:43

                  @John_38 said in How to send email using Qt 5.5.1:

                  I need install OpenSSL ?

                  yes

                  J Offline
                  J Offline
                  John_38
                  wrote on 26 Aug 2016, 12:15 last edited by John_38
                  #10

                  @raven-worx said in How to send email using Qt 5.5.1:

                  @John_38 said in How to send email using Qt 5.5.1:

                  I need install OpenSSL ?

                  yes

                  I have installed 'OpenSSL'.
                  I have paste 'libeay32.dll' and 'ssleay32.dll' in my .exe directory.
                  I have this error: http://prntscr.com/canynu
                  Can you help me ?

                  R 1 Reply Last reply 26 Aug 2016, 12:44
                  0
                  • J John_38
                    26 Aug 2016, 12:15

                    @raven-worx said in How to send email using Qt 5.5.1:

                    @John_38 said in How to send email using Qt 5.5.1:

                    I need install OpenSSL ?

                    yes

                    I have installed 'OpenSSL'.
                    I have paste 'libeay32.dll' and 'ssleay32.dll' in my .exe directory.
                    I have this error: http://prntscr.com/canynu
                    Can you help me ?

                    R Offline
                    R Offline
                    raven-worx
                    Moderators
                    wrote on 26 Aug 2016, 12:44 last edited by
                    #11

                    @John_38
                    are you creating the socket and it connection?
                    or is this handled internally in the lib?

                    --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                    If you have a question please use the forum so others can benefit from the solution in the future

                    J 1 Reply Last reply 26 Aug 2016, 15:33
                    0
                    • R raven-worx
                      26 Aug 2016, 12:44

                      @John_38
                      are you creating the socket and it connection?
                      or is this handled internally in the lib?

                      J Offline
                      J Offline
                      John_38
                      wrote on 26 Aug 2016, 15:33 last edited by
                      #12

                      @raven-worx said in How to send email using Qt 5.5.1:

                      @John_38
                      are you creating the socket and it connection?
                      or is this handled internally in the lib?

                      No I dont know how to :/
                      Can you tell me what I need to do ?
                      Thank man !

                      1 Reply Last reply
                      0
                      • J Offline
                        J Offline
                        John_38
                        wrote on 26 Aug 2016, 15:48 last edited by
                        #13

                        Ok now I have modified settings on my google account.
                        It's work now.
                        But after mail send my application crash..
                        I don't know why..
                        Can you help me ?
                        http://prntscr.com/caqya2

                        1 Reply Last reply
                        0
                        • SGaistS Offline
                          SGaistS Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on 26 Aug 2016, 21:20 last edited by
                          #14

                          Hi,

                          The best way to know why is to run your application through the debugger, you should get the point where the problem occurs.

                          Interested in AI ? www.idiap.ch
                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                          J 1 Reply Last reply 27 Aug 2016, 15:01
                          1
                          • SGaistS SGaist
                            26 Aug 2016, 21:20

                            Hi,

                            The best way to know why is to run your application through the debugger, you should get the point where the problem occurs.

                            J Offline
                            J Offline
                            John_38
                            wrote on 27 Aug 2016, 15:01 last edited by
                            #15

                            @SGaist said in How to send email using Qt 5.5.1:

                            Hi,

                            The best way to know why is to run your application through the debugger, you should get the point where the problem occurs.

                            Hi, thank for your feedback.
                            I have using the debug mode.
                            This is error: http://prntscr.com/cb2q7n

                            1 Reply Last reply
                            0
                            • SGaistS Offline
                              SGaistS Offline
                              SGaist
                              Lifetime Qt Champion
                              wrote on 27 Aug 2016, 21:26 last edited by
                              #16

                              The link shows a broken image

                              Interested in AI ? www.idiap.ch
                              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                              1 Reply Last reply
                              0
                              • J Offline
                                J Offline
                                John_38
                                wrote on 28 Aug 2016, 18:37 last edited by John_38
                                #17

                                My error: http://imgur.com/0FeDXPJ

                                1 Reply Last reply
                                0
                                • SGaistS Offline
                                  SGaistS Offline
                                  SGaist
                                  Lifetime Qt Champion
                                  wrote on 29 Aug 2016, 09:20 last edited by
                                  #18

                                  Are you doing any multi-threading stuff with that class ?

                                  Interested in AI ? www.idiap.ch
                                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                  J 1 Reply Last reply 29 Aug 2016, 09:20
                                  0
                                  • SGaistS SGaist
                                    29 Aug 2016, 09:20

                                    Are you doing any multi-threading stuff with that class ?

                                    J Offline
                                    J Offline
                                    John_38
                                    wrote on 29 Aug 2016, 09:20 last edited by
                                    #19

                                    @SGaist No

                                    1 Reply Last reply
                                    0
                                    • SGaistS Offline
                                      SGaistS Offline
                                      SGaist
                                      Lifetime Qt Champion
                                      wrote on 29 Aug 2016, 20:37 last edited by
                                      #20

                                      You should check what data you receive.

                                      Interested in AI ? www.idiap.ch
                                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                      1 Reply Last reply
                                      0
                                      • M Offline
                                        M Offline
                                        maksimilijan
                                        wrote on 19 Jan 2022, 19:41 last edited by
                                        #21
                                        This post is deleted!
                                        1 Reply Last reply
                                        0
                                        • SGaistS Offline
                                          SGaistS Offline
                                          SGaist
                                          Lifetime Qt Champion
                                          wrote on 19 Jan 2022, 19:52 last edited by
                                          #22

                                          Hi,

                                          Are you asking for someone to reimplement something like Postfix using Qt ?

                                          Interested in AI ? www.idiap.ch
                                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                          M 1 Reply Last reply 20 Jan 2022, 12:08
                                          0

                                          • Login

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