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

📄 classsmtp.html

📁 LINUX下发送邮件的库,测试很好用,有各种发送测试的例子
💻 HTML
📖 第 1 页 / 共 4 页
字号:
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Set the credentials.<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>
<tr><td valign=top><em>auth_type</em>&nbsp;</td><td>
The authentication mechanism that should be used. </td></tr>
</table>
</dl>    </td>
  </tr>
</table>
<a name="a4" doxytag="SMTP::setSSLOpts"></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::setSSLOpts </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="classSMTP.html#s10">SMTP::SSL_TYPE</a>&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>ssl_type</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="classSSLSocket.html#s2">SSLSocket::SSL_OPTS</a>&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>opts</em> = SSLSocket::VERIFY_PEER, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const string &amp;&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>ca_file</em> = "", </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const string &amp;&nbsp;</td>
          <td class="mdname" nowrap>&nbsp; <em>ca_dir</em> = ""</td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Set some SSL specific options. This method must be called prior to <a class="el" href="classSMTP.html#a5">SMTP::sendMessage</a>() if SSL encryption is desired.<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>ssl_type</em>&nbsp;</td><td>
The ssl protocol flavor that should be used. </td></tr>
<tr><td valign=top><em>opts</em>&nbsp;</td><td>
The ssl options that should be set. </td></tr>
<tr><td valign=top><em>ca_file</em>&nbsp;</td><td>
A file that contains certificates.  The file can contain several CA certificates  identified by</td></tr>
</table>
</dl>-----BEGIN CERTIFICATE-----
<p>
... [CA certificate in base64 encoding] ...
<p>
-----END CERTIFICATE-----
<p>
sequences. Before, between, and after the  certificates text is allowed which can be used e.g. for descriptions of the  certificates.
<p>
Take a look in the openssl documentation to  get more infos on that topic.
<p>
"man 3 SSL_CTX_load_verify_locations" should give  you also more infos on that topic. <dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>ca_dir</em>&nbsp;</td><td>
A directory that contains certificates.  The files each contain one CA certificate. The files  are looked up by the CA subject name hash value, which  must hence be available. If more than one CA certificate  with the same name hash value exist, the extension must be  different (e.g. 9d66eef0.0, 9d66eef0.1 etc). The search  is performed in the ordering of the extension number,  regardless of other properties of the certificates.  Use the c_rehash utility to create the necessary links.</td></tr>
</table>
</dl>Take a look in the openssl documentation to  get more infos on that topic.
<p>
"man 3 SSL_CTX_load_verify_locations" should give you also more infos on that topic.     </td>
  </tr>
</table>
<a name="b5" doxytag="SMTP::startSSL"></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::startSSL </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>
Start the SSL handshaking process.<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="classIOException.html">IOException</a></em>&nbsp;</td><td>
 If one of ca_file or ca_dir is not accessible. </td></tr>
</table>
</dl>    </td>
  </tr>
</table>
<hr><h2>Member Data Documentation</h2>
<a name="n6" doxytag="SMTP::auth_type"></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">AUTH_TYPE</a> SMTP::auth_type<code> [protected]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
The authentication method.     </td>
  </tr>
</table>
<a name="n0" doxytag="SMTP::domain"></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::domain<code> [protected]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
The domain for the HELO command.     </td>
  </tr>
</table>
<a name="n1" doxytag="SMTP::from"></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::from<code> [protected]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
The envelope from address.     </td>
  </tr>
</table>
<a name="n2" doxytag="SMTP::msgs"></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"> vector&lt;Message&gt; SMTP::msgs<code> [protected]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
The messages that will be send.     </td>
  </tr>
</table>
<a name="n5" doxytag="SMTP::password"></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::password<code> [protected]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
The password.     </td>
  </tr>
</table>
<a name="n3" doxytag="SMTP::socket"></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="classSSLSocket.html">SSLSocket</a>* SMTP::socket<code> [protected]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
The socket.     </td>
  </tr>
</table>
<a name="n7" doxytag="SMTP::ssl_type"></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#s10">SSL_TYPE</a> SMTP::ssl_type<code> [protected]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
The ssl mechanism.     </td>
  </tr>
</table>
<a name="n4" doxytag="SMTP::username"></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::username<code> [protected]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
The username.     </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="smtp_8h-source.html">smtp.h</a><li>smtp.cpp</ul>
<hr><address align="right"><small>Generated on Tue Jan 28 17:09:59 2003 by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 
width=110 height=53></a>1.2.15 </small></address>
</body>
</html>

⌨️ 快捷键说明

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