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

📄 classsmtp.html

📁 LINUX下发送邮件的库,测试很好用,有各种发送测试的例子
💻 HTML
📖 第 1 页 / 共 4 页
字号:
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [protected]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </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>&nbsp;</td><td>
The username that should be used for authentication. </td></tr>
<tr><td valign=top><em>passwd</em>&nbsp;</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>&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>
<tr><td valign=top><em><a class="el" href="classDecodeException.html">DecodeException</a></em>&nbsp;</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">(&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>password</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [protected]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </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>&nbsp;</td><td>
The username that should be used for authentication. </td></tr>
<tr><td valign=top><em>passwd</em>&nbsp;</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>&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="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">(&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>password</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [protected]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </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>&nbsp;</td><td>
The username that should be used for authentication. </td></tr>
<tr><td valign=top><em>passwd</em>&nbsp;</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>&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="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">(&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>
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>&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>
<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 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">(&nbsp;</td>
          <td class="md" nowrap valign="top">const string &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>&nbsp; <em>response</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>
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>&nbsp;</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">(&nbsp;</td>
          <td class="md" nowrap valign="top">const string &amp;&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>response</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const string &amp;&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>auth_type</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [protected]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </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>&nbsp;</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>&nbsp;</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>&nbsp;</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">(&nbsp;</td>
          <td class="md" nowrap valign="top">const string &amp;&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>answer</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>is_221_fatal</em> = true</td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [protected]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </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>&nbsp;</td><td>
The response string from the SMTP server that should be evaluated. </td></tr>
<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>

⌨️ 快捷键说明

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