Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. Send mail
Forum Updated to NodeBB v4.3 + New Features

Send mail

Scheduled Pinned Locked Moved 3rd Party Software
qxt
25 Posts 3 Posters 11.9k Views 2 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #21

    Don't send the message before connecting all the signals.

    Add a button and in the slot connected to its clicked signal, create and send the message.

    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
    • Y Offline
      Y Offline
      Yacinoben
      wrote on last edited by
      #22

      I tried, but always Nothing, when i click in button, no message error .

       QPushButton *button = new QPushButton("Send",this);
            QxtMailMessage *message =new QxtMailMessage;;
            QxtSmtp *smtp= new QxtSmtp(this);
            smtp->setUsername("Ken31@gmail.com");
            smtp->setPassword("password");
            smtp->connectToSecureHost("smtp.gmail.com");
      
         connect(button,&QPushButton::pressed,this,[smtp,message]{
                 message->setSender("Ken31@gmail.com");
                 message->addRecipient("Ken31@gmail.com");
                 message->setSubject("Alarm");
                 message->setBody("Alarm message.");
                 smtp->send(*message);});
      
      /*other signal*/
      

      I also tried to write functions of QXtSmtp in the slot lamba-function but nothing

      1 Reply Last reply
      0
      • M Offline
        M Offline
        MajidKamali
        wrote on last edited by
        #23

        Did you turned on less secure apps?
        https://www.google.com/settings/security/lesssecureapps

        1 Reply Last reply
        0
        • Y Offline
          Y Offline
          Yacinoben
          wrote on last edited by Yacinoben
          #24

          Yes, i used this code source : https://codeload.github.com/xcoder123/SimpleSmtp_SSL_QT5/zip/master and he works perfectly .

          1 Reply Last reply
          0
          • Y Offline
            Y Offline
            Yacinoben
            wrote on last edited by
            #25

            The essential Qxt is builded and works.
            @SGaist thank you for your help :)

            1 Reply Last reply
            0

            • Login

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