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. QT email client using IMAP4

QT email client using IMAP4

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

    I am developing a QT program that will check for new mails from gmail and download them using IMAP4 protocol. I am unable to write a command to display the messages in my inbox. please help me. Here is a sample of my code.
    @ socket->connectToHostEncrypted("imap.gmail.com", 993);

    if(!socket->waitForConnected(50000)){
        qDebug()<<"Error:"<<socket->errorString();
    }
    

    }

    void MySocket::connected(){
    qDebug()<<"*\nconnected....\n";

    QByteArray byteArray("a001 LOGIN username password@");
    socket->write(byteArray);
    socket->write("\r\n");
    
    socket->waitForReadyRead();
    
    byteArray.clear();
    byteArray.append("A002 STARTTLS");
    socket->write(byteArray);
    socket->write("\r\n");
    

    }
    @

    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