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

Disconnect from the server


#include <libmail/mail.H>

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

account->logout(myCallback &callback);


Close the mail account. The application should wait until either callback.success or is called (not much of a difference, really, in both cases the mail::account object disconnects from the server). The disconnected method of the mail::callback::disconnect object, originally passed to mail::account::open, is also invoked.

Return Codes

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.

In this case, however, there is no substantial difference between success and fail. mail::account::logout does not destroy the mail::account object, the object may be destroyed after either callback function is invoked.


Sam Varshavchik


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