⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 classsmtp.html

📁 LINUX下发送邮件的库,测试很好用,有各种发送测试的例子
💻 HTML
📖 第 1 页 / 共 4 页
字号:
  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">(&nbsp;</td>
          <td class="md" nowrap valign="top">bool&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>is_221_fatal</em> = true          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [protected]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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">(&nbsp;</td>
          <td class="md" nowrap valign="top">Message &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>msg</em>          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [protected]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [protected]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </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>&nbsp;</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>&nbsp;</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>&nbsp;</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">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [protected]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </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>&nbsp;</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>&nbsp;</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>&nbsp;</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">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp;          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [protected]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </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>&nbsp;</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>&nbsp;</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>&nbsp;</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">(&nbsp;</td>
          <td class="md" nowrap valign="top">Message &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>msg</em>          </td>
          <td class="md" valign="top">)&nbsp;</td>
          <td class="md" nowrap><code> [protected]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </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>&nbsp;</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>&nbsp;</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>&nbsp;</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>&nbsp;</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">(&nbsp;</td>
          <td class="md" nowrap valign="top">const string &amp;&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>username</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const string &amp;&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>passwd</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="classSMTP.html#s9">AUTH_TYPE</a>&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>auth_type</em> = SMTP::AUTO</td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -