Logo Search packages:      
Sourcecode: mailody version File versions  Download package

void Mailody::Imaplib::getHeaders ( const QString &  mb,
const QStringList &  uids 
)

Will fetch the headers of mailbox.

Definition at line 332 of file imaplib.cpp.

{
    // kdDebug() << k_funcinfo << << uids << mb << endl;
    if (uids.count() == 0 || mb.isEmpty())
        return;

    // Join first, then split it in blocks of 250.
    QString complete = uids.join(",");

    int begin = 1;
    while (!complete.isEmpty())
    {
        QString part = complete.section(',',0,250);
        complete = complete.section(',',251);

        uint end = begin + 250;
        if (end > uids.count())
            end = uids.count();

        // Priority; above the checkmail calls in the queue.
        m_queue.prepend(Queue(Queue::GetHeaders, mb,
                   "UID FETCH " + part
           + " (RFC822.SIZE BODY.PEEK[HEADER.FIELDS (FROM TO CC SUBJECT "
                           "DATE IN-REPLY-TO MESSAGE-ID)])",
               i18n("Retrieving headers [%1-%2] for %3")
                       .arg(begin).arg(end).arg(mb)));

        begin += 250;
    }
}


Generated by  Doxygen 1.6.0   Back to index