📄 classsmtp.html
字号:
If the SMTP answer is a fatal error msg. </td></tr>
</table>
</dl> </td>
</tr>
</table>
<a name="b12" doxytag="SMTP::read_response"></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"> string SMTP::read_response </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">bool </td>
<td class="mdname1" valign="top" nowrap> <em>is_221_fatal</em> = true </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>
Reads the response from the smtp server.<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<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>
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 receiving data from 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 receiving data from the encrypted socket. </td></tr>
</table>
</dl> </td>
</tr>
</table>
<a name="b3" doxytag="SMTP::sendDATA"></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::sendDATA </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">Message & </td>
<td class="mdname1" valign="top" nowrap> <em>msg</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>
Send the DATA command.<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>msg</em> </td><td>
The message that the RCPT TO cms belongs to.</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="b0" doxytag="SMTP::sendHELO"></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::sendHELO </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>
send the HELO command.<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="b1" doxytag="SMTP::sendMAILFROM"></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::sendMAILFROM </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>
Send the MAIL command.<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="a5" doxytag="SMTP::sendMessage"></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::sendMessage </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Send the messages.<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="classTransferException.html">TransferException</a></em> </td><td>
If the connection to the host cannot be established. </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="classIOException.html">IOException</a></em> </td><td>
If one of ca_file or ca_dir is not accessible. </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 an error occured during the BASE64 de-/encoding process. </td></tr>
</table>
</dl> </td>
</tr>
</table>
<a name="b4" doxytag="SMTP::sendQUIT"></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::sendQUIT </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>
Send the QUIT command.<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="b2" doxytag="SMTP::sendRCPTTO"></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::sendRCPTTO </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">Message & </td>
<td class="mdname1" valign="top" nowrap> <em>msg</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>
Send the RCPT command.<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>msg</em> </td><td>
The message that the RCPT TO cms belongs to.</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="a3" doxytag="SMTP::setCredentials"></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::setCredentials </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>passwd</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap><a class="el" href="classSMTP.html#s9">AUTH_TYPE</a> </td>
<td class="mdname" nowrap> <em>auth_type</em> = SMTP::AUTO</td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -