<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=us-ascii"/> <title>mail::loginUrlEncode</title> <link rel="stylesheet" href="manpage.css" type="text/css"/> <link rel="start" href="index.html" title="Cone: COnsole Newsreader And Emailer"/> <link rel="up" href="libmail-misc.html" title="Miscellaneous functions"/> <link rel="prev" href="mail-hostname.html" title="mail::hostname"/> <link rel="next" href="mail-loginurldecode.html" title="mail::loginUrlDecode"/> <link xmlns="" rel="icon" href="icon.gif" type="image/gif"/> <meta xmlns="" name="MSSmartTagsPreventParsing" content="TRUE"/> <!-- Copyright 2002 - 2007 Double Precision, Inc. See COPYING for distribution information. --> </head> <body> <div class="navheader"> <table width="100%" summary="Navigation header"> <tr> <th colspan="3" align="center" rowspan="1"> mail::loginUrlEncode</th> </tr> <tr> <td width="20%" align="left" rowspan="1" colspan="1"> <a accesskey="p" href="mail-hostname.html" shape="rect">Prev</a> </td> <th width="60%" align="center" rowspan="1" colspan="1"> Miscellaneous functions</th> <td width="20%" align="right" rowspan="1" colspan="1">  <a accesskey="n" href="mail-loginurldecode.html" shape="rect">Next</a></td> </tr> </table> <hr/> </div> <div class="refentry" lang="en" xml:lang="en"> <a id="mail-loginurlencode" shape="rect" name="mail-loginurlencode"> </a> <div class="titlepage"/> <div class="refnamediv"> <h2>Name</h2> <p>mail::loginUrlEncode — Create a mail account URL</p> </div> <div class="refsynopsisdiv"> <h2>Synopsis</h2> <div class="literallayout"> <p><br clear="none"/>       <br clear="none"/> <br clear="none"/> <br clear="none"/> #include <libmail/mail.H><br clear="none"/> <br clear="none"/></p> </div> <div class="funcsynopsis"> <table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"> <tr> <td rowspan="1" colspan="1"><code class="funcdef">std::string url=<b class="fsfunc">mail::loginUrlEncode</b>(</code></td> <td rowspan="1" colspan="1">std::string  </td> <td rowspan="1" colspan="1"><var class="pdparam">method</var>,</td> </tr> <tr> <td rowspan="1" colspan="1"> </td> <td rowspan="1" colspan="1">std::string  </td> <td rowspan="1" colspan="1"><var class="pdparam">server</var>,</td> </tr> <tr> <td rowspan="1" colspan="1"> </td> <td rowspan="1" colspan="1">std::string  </td> <td rowspan="1" colspan="1"><var class="pdparam">uid</var>,</td> </tr> <tr> <td rowspan="1" colspan="1"> </td> <td rowspan="1" colspan="1">std::string  </td> <td rowspan="1" colspan="1"><var class="pdparam">password</var><code>)</code>;</td> </tr> </table> </div> </div> <div class="refsect1" lang="en" xml:lang="en"> <a id="id612869" shape="rect" name="id612869"> </a> <h2>USAGE</h2> <p>This utility function creates a URL, suitable for <a class="link" href="mail-open.html" title="mail::account::open" shape="rect"><span class="citerefentry"><span class="refentrytitle">mail::account::open</span>(3x)</span></a>, for opening a mail account on a remote server.</p> <p><em class="parameter"><code>method</code></em> is one of the supported <span class="application">libmail</span> network protocols: "<code class="literal">imap</code>", "<code class="literal">imaps</code>", "<code class="literal">pop3</code>", "<code class="literal">pop3s</code>", "<code class="literal">nntp</code>", "<code class="literal">nntps</code>", "<code class="literal">smtp</code>", or "<code class="literal">smtps</code>". <em class="parameter"><code>server</code></em> is the remote server name. The server name is optionally appended by a colon and a port number, to specify a non-default port for the protocol.</p> <p><em class="parameter"><code>uid</code></em> identifies the mail account's login id. With "<code class="literal">smtp</code>", or "<code class="literal">smtps</code>", <em class="parameter"><code>uid</code></em> specifies the userid for authenticated ESMTP. The <em class="parameter"><code>password</code></em> is optional. <a class="link" href="mail-open.html" title="mail::account::open" shape="rect"><span class="citerefentry"><span class="refentrytitle">mail::account::open</span>(3x)</span></a> accepts a separate <em class="parameter"><code>password</code></em> parameter. This <em class="parameter"><code>password</code></em> should be an empty string, so that the resulting URL does not include the password. The real password is then passed as a parameter to <a class="link" href="mail-open.html" title="mail::account::open" shape="rect"><span class="citerefentry"><span class="refentrytitle">mail::account::open</span>(3x)</span></a>. As an alternative, this <em class="parameter"><code>password</code></em> parameter can be initialized. The resulting URL will include the password, and the the <em class="parameter"><code>password</code></em> parameter to <a class="link" href="mail-open.html" title="mail::account::open" shape="rect"><span class="citerefentry"><span class="refentrytitle">mail::account::open</span>(3x)</span></a>. should be set to an empty string.</p> <div class="refsect2" lang="en" xml:lang="en"> <a id="id613064" shape="rect" name="id613064"> </a> <h3>Options</h3> <p>Additional protocol options are specified by prefixing each option with the forward-slash character, "<span class="token">/</span>", and appending all options to <em class="parameter"><code>server</code></em> (after any optional protocol port number).</p> </div> </div> <div class="refsect1" lang="en" xml:lang="en"> <a id="id613086" shape="rect" name="id613086"> </a> <h2>Return Codes</h2> <p>This function returns the resulting URL.</p> </div> <div class="refsect1" lang="en" xml:lang="en"> <a id="id613096" shape="rect" name="id613096"> </a> <h2>SEE ALSO</h2> <p><a class="link" href="mail-open.html" title="mail::account::open" shape="rect"><span class="citerefentry"><span class="refentrytitle">mail::account::open</span>(3x)</span></a>, <a class="link" href="mail-loginurlencode.html" title="mail::loginUrlEncode" shape="rect"><span class="citerefentry"><span class="refentrytitle">mail::loginUrlEncode</span>(3x)</span></a>.</p> </div> </div> <div class="navfooter"> <hr/> <table width="100%" summary="Navigation footer"> <tr> <td width="40%" align="left" rowspan="1" colspan="1"> <a accesskey="p" href="mail-hostname.html" shape="rect">Prev</a> </td> <td width="20%" align="center" rowspan="1" colspan="1"> <a accesskey="u" href="libmail-misc.html" shape="rect">Up</a></td> <td width="40%" align="right" rowspan="1" colspan="1">  <a accesskey="n" href="mail-loginurldecode.html" shape="rect">Next</a></td> </tr> <tr> <td width="40%" align="left" valign="top" rowspan="1" colspan="1">mail::hostname </td> <td width="20%" align="center" rowspan="1" colspan="1"> <a accesskey="h" href="index.html" shape="rect">Home</a> | <a accesskey="t" href="bk01-toc.html" shape="rect">ToC</a></td> <td width="40%" align="right" valign="top" rowspan="1" colspan="1"> mail::loginUrlDecode</td> </tr> </table> </div> </body> </html>