mail::account::checkNewMail.3x - Man Page

Check for new mail


#include <libmail/mail.H>

class myCallback : public mail::callback {
    void success(std::string msg);
    void fail(std::string msg);
mail::account *account;

account->checkNewMail(myCallback &callback);


This request checks for new messages in the currently open folder. With some accounts this request also checks for any messages that were removed from the folder by another process or application.

Return Codes and Callbacks

The application must wait until callback's success or fail method is invoked. The success method is invoked when this request is succesfully processed. The fail method is invoked if this request cannot be processed. The application must not destroy callback until either the success or fail method is invoked.


callback's fail method may be invoked even after other callback methods were invoked. This indicates that the request was partially completed before the error was encountered.

This request may result in additional callback methods invoked before the success method is invoked. The currently opened folder's callback::folder's object's newMessages method will be invoked if the current folder has any new messages. The messagesRemoved and messageChanged methods may also be invoked.


Sam Varshavchik


08/25/2016 Cone© Cone: COnsole Newsreader And E