<<< Previous |  | Next >>>

# mail::folder::toString

## Name

mail::folder::toString -- Save a folder object

## Synopsis

#include <libmail/mail.H>
mail::folder *folder;

``std::string str=folder->`toString``(void);`

## USAGE

This method returns a `std::string` that can be placed in some quiet, out of the way spot. At some later point in time, passing the `std::string` to mail::account::folderfromstring(3x) will create a `mail::folder` object that will refer to the same folder as the original object.

NOTE: | Folders may only be recreated by `mail::account` objects that reference the same mail account referenced by the original `mail::folder` object.

## RETURN CODES AND CALLBACKS

This function returns a `std::string` that the application should not attempt to interpret in any way (except as a parameter to mail::account::folderfromstring(3x).

NOTE: | `mail::folder`s are linked to their corresponding `mail::account`s. A `mail::folder` created by one `mail::account` may not be used with a different `mail::folder`. All `mail::folder`s created by a `mail::account` are invalidated when this `mail::account` object is destroyed. Note that the `mail::folder` objects are not automatically destroyed; the application is still responsible for destroying any remaining `mail::folder`s, after their a `mail::account` is destroyed.

## SEE ALSO

mail::account::folderfromstring(3x).

<<< Previous | Home | Next >>>
mail::folder::setRights | Up | Creating headers