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

QT email client using IMAP4

Scheduled Pinned Locked Moved General and Desktop
1 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.
  • W Offline
    W Offline
    washymasai
    wrote on 12 Jul 2014, 09:25 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

    1/1

    12 Jul 2014, 09:25

    • Login

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