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. Qxtsmtp connect->disconnect
Forum Updated to NodeBB v4.3 + New Features

Qxtsmtp connect->disconnect

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 1.2k 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.
  • B Offline
    B Offline
    bloodfont
    wrote on last edited by
    #1

    Hi, I am having a problem using qxtsmtp. I am able to send emails by connecting to gmail's smtp server but I cannot do so using a payed for server. It just connects and disconnects immediately afterwords. I connected all the slots to functions to display error messages but nothing. I have tried with all qxtsmtp's slots, QTcpSocket's slots, QAbstractSocket's slots but nothing. I have browsed the source code of qxtsmtp.cpp and it seems to me that the only moment in which only the disconnect signal is emitted is when sending EHLO/HELO:

    //code snippet from qxtsmtp.cpp
    if (code != "250")
    {
    // error!
    if (state != HeloSent)
    {
    // maybe let's try HELO
    socket->write("helo\r\n");
    state = HeloSent;
    }
    else
    {
    // nope
    socket->write("QUIT\r\n");
    socket->flush();
    socket->disconnectFromHost();
    }
    return;
    }

    So it tries to send HELO, it doesn't work and so it disconnects. I'm thinking that the server has a problem with how these messages are sent. Any thoughts would be greatly appreciated.
    Thanks in advance.

    1 Reply Last reply
    0
    • B Offline
      B Offline
      bloodfont
      wrote on last edited by
      #2

      Sorry, here is the correct code formatting:

      @//code snippet from qxtsmtp.cpp
      if (code != “250”)
      {
      // error!
      if (state != HeloSent)
      {
      // maybe let’s try HELO
      socket->write(“helo\r\n”);
      state = HeloSent;
      }
      else
      {
      // nope
      socket->write(“QUIT\r\n”);
      socket->flush();
      socket->disconnectFromHost();
      }
      return;
      }@

      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