<<< Previous |  | Next >>>

# mail::loginUrlDecode

## Name

mail::loginUrlDecode -- Decode a mail account URL

## Synopsis

#include <libmail/mail.H>
#include <libmail/logininfo.H>
mail::loginInfo urlInfo;

``bool ok=`mail::account::loginDecode``(std::string `url`, `urlInfo`);`

std::string method=urlInfo.method;
std::string server=urlInfo.server;
std::string uid=urlInfo.uid;
std::string pwd=urlInfo.pwd;
std::map<std::string, std::string>::iterator
optionBegin=urlInfo.options.begin(),
optionEnd=urlInfo.options.end();

## USAGE

This function does the opposite of mail::loginUrlEncode(3x); a mail account URL string is broken down into its components:

`method`

  The protocol name.

`server`

  The name of the mail account's server

`uid`

  The mail account login ID.

`pwd`

  The mail account's password, if specified by the URL.

`options`

  This map lists any additional options specified by the URL (all "/name=value" options are placed into this map).

## Return Codes

This function returns `true` if `urlInfo` (a reference to a `mail::loginInfo` object) was initialized from the contents of a valid URL, or `false` if the URL was not valid.

## SEE ALSO

mail::loginUrlEncode(3x).

<<< Previous | Home | Next >>>
mail::loginUrlEncode | Up | mail::setAppCharset