📄 classsmtp.html
字号:
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [protected]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
authenticates the user using the CRAM-SHA1 method.<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>username</em> </td><td>
The username that should be used for authentication. </td></tr>
<tr><td valign=top><em>passwd</em> </td><td>
The password that should be used for authentication.</td></tr>
</table>
</dl><dl compact><dt><b>
Exceptions: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em><a class="el" href="classTransferException.html">TransferException</a></em> </td><td>
If the SMTP server responds with an error msg. </td></tr>
<tr><td valign=top><em><a class="el" href="classTransferException.html">TransferException</a></em> </td><td>
On any uncommon event that occurs while sending data through the socket. </td></tr>
<tr><td valign=top><em><a class="el" href="classSSLException.html">SSLException</a></em> </td><td>
On any uncommon event that occurs while sending data through the encrypted socket. </td></tr>
<tr><td valign=top><em><a class="el" href="classDecodeException.html">DecodeException</a></em> </td><td>
If the BASE64 data was invalid. </td></tr>
</table>
</dl> </td>
</tr>
</table>
<a name="b8" doxytag="SMTP::auth_login"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void SMTP::auth_login </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const string & </td>
<td class="mdname" nowrap> <em>username</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>const string & </td>
<td class="mdname" nowrap> <em>password</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [protected]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Authenticates the user using the LOGIN method.<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>username</em> </td><td>
The username that should be used for authentication. </td></tr>
<tr><td valign=top><em>passwd</em> </td><td>
The password that should be used for authentication.</td></tr>
</table>
</dl><dl compact><dt><b>
Exceptions: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em><a class="el" href="classTransferException.html">TransferException</a></em> </td><td>
If the SMTP server responds with an error msg. </td></tr>
<tr><td valign=top><em><a class="el" href="classTransferException.html">TransferException</a></em> </td><td>
On any uncommon event that occurs while sending data through the socket. </td></tr>
<tr><td valign=top><em><a class="el" href="classSSLException.html">SSLException</a></em> </td><td>
On any uncommon event that occurs while sending data through the encrypted socket. </td></tr>
</table>
</dl> </td>
</tr>
</table>
<a name="b9" doxytag="SMTP::auth_plain"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void SMTP::auth_plain </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const string & </td>
<td class="mdname" nowrap> <em>username</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>const string & </td>
<td class="mdname" nowrap> <em>password</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [protected]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Authenticates the user using the PLAIN method.<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>username</em> </td><td>
The username that should be used for authentication. </td></tr>
<tr><td valign=top><em>passwd</em> </td><td>
The password that should be used for authentication.</td></tr>
</table>
</dl><dl compact><dt><b>
Exceptions: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em><a class="el" href="classTransferException.html">TransferException</a></em> </td><td>
If the SMTP server responds with an error msg. </td></tr>
<tr><td valign=top><em><a class="el" href="classTransferException.html">TransferException</a></em> </td><td>
On any uncommon event that occurs while sending data through the socket. </td></tr>
<tr><td valign=top><em><a class="el" href="classSSLException.html">SSLException</a></em> </td><td>
On any uncommon event that occurs while sending data through the encrypted socket. </td></tr>
</table>
</dl> </td>
</tr>
</table>
<a name="b7" doxytag="SMTP::authenticate"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void SMTP::authenticate </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">) </td>
<td class="md" nowrap><code> [protected]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Authenticates the user using the given AUTH_TYPE.<dl compact><dt><b>
Exceptions: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em><a class="el" href="classTransferException.html">TransferException</a></em> </td><td>
If the SMTP server responds with an error msg. </td></tr>
<tr><td valign=top><em><a class="el" href="classTransferException.html">TransferException</a></em> </td><td>
On any uncommon event that occurs while sending data through the socket. </td></tr>
<tr><td valign=top><em><a class="el" href="classSSLException.html">SSLException</a></em> </td><td>
On any uncommon event that occurs while sending data through the encrypted socket. </td></tr>
<tr><td valign=top><em><a class="el" href="classAuthenticationFailedException.html">AuthenticationFailedException</a></em> </td><td>
If the given authentication method is not supported by the SMTP server. </td></tr>
<tr><td valign=top><em><a class="el" href="classDecodeException.html">DecodeException</a></em> </td><td>
If the BASE64 data was invalid. </td></tr>
</table>
</dl> </td>
</tr>
</table>
<a name="b14" doxytag="SMTP::best_auth_method"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="classSMTP.html#s9">SMTP::AUTH_TYPE</a> SMTP::best_auth_method </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const string & </td>
<td class="mdname1" valign="top" nowrap> <em>response</em> </td>
<td class="md" valign="top">) </td>
<td class="md" nowrap><code> [protected]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
determine the best authentication mechanism supported by the SMTP server.<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>response</em> </td><td>
The string that the SMTP server send as a response to the EHLO cmd. </td></tr>
</table>
</dl> </td>
</tr>
</table>
<a name="b13" doxytag="SMTP::check_auth_method"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void SMTP::check_auth_method </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const string & </td>
<td class="mdname" nowrap> <em>response</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>const string & </td>
<td class="mdname" nowrap> <em>auth_type</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [protected]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Check if the given authentication method is supported by the server. If not an AuthenticationfailedException is thrown.<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>response</em> </td><td>
The string that the SMTP server send as a response to the EHLO cmd. </td></tr>
<tr><td valign=top><em>auth_type</em> </td><td>
The authentication mechanism that is to be checked.</td></tr>
</table>
</dl><dl compact><dt><b>
Exceptions: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em><a class="el" href="classAuthenticationFailedException.html">AuthenticationFailedException</a></em> </td><td>
If the given authentication method is not supported by the SMTP server. </td></tr>
</table>
</dl> </td>
</tr>
</table>
<a name="b6" doxytag="SMTP::evalResponse"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr>
<td class="md">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void SMTP::evalResponse </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const string & </td>
<td class="mdname" nowrap> <em>answer</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>bool </td>
<td class="mdname" nowrap> <em>is_221_fatal</em> = true</td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [protected]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Evaluates the SMTP reply and throws an <a class="el" href="classTransferException.html">TransferException</a> if a fatal error occured or prints a warning message to stderr on any not fatal error.<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>answer</em> </td><td>
The response string from the SMTP server that should be evaluated. </td></tr>
<tr><td valign=top><em>is_221_fatal</em> </td><td>
If true a SMTP response with the ID 221 will result in a <a class="el" href="classTransferException.html">TransferException</a>.</td></tr>
</table>
</dl><dl compact><dt><b>
Exceptions: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em><a class="el" href="classTransferException.html">TransferException</a></em> </td><td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -