📄 classpsmtpclient.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>PSMTPClient class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.2.18 --><center><a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center><hr><h1>PSMTPClient Class Reference</h1><code>#include <<a class="el" href="inetmail_8h-source.html">inetmail.h</a>></code><p><p>Inheritance diagram for PSMTPClient:<p><center><img src="classPSMTPClient.png" usemap="#PSMTPClient_map" border="0" alt=""></center><map name="PSMTPClient_map"><area href="classPSMTP.html" alt="PSMTP" shape="rect" coords="0,224,109,248"><area href="classPInternetProtocol.html" alt="PInternetProtocol" shape="rect" coords="0,168,109,192"><area href="classPIndirectChannel.html" alt="PIndirectChannel" shape="rect" coords="0,112,109,136"><area href="classPChannel.html" alt="PChannel" shape="rect" coords="0,56,109,80"><area href="classPObject.html" alt="PObject" shape="rect" coords="0,0,109,24"></map><a href="classPSMTPClient-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0><tr><td></td></tr><tr><td colspan=2><br><h2>Public Methods</h2></td></tr><tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classPSMTPClient.html#a0">PSMTPClient</a> ()</td></tr><tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classPSMTPClient.html#a1">~PSMTPClient</a> ()</td></tr><tr><td nowrap align=right valign=top>virtual BOOL </td><td valign=bottom><a class="el" href="classPSMTPClient.html#a2">Close</a> ()</td></tr><tr><td nowrap align=right valign=top>BOOL </td><td valign=bottom><a class="el" href="classPSMTPClient.html#a3">LogIn</a> (const <a class="el" href="classPString.html">PString</a> &username, const <a class="el" href="classPString.html">PString</a> &password)</td></tr><tr><td nowrap align=right valign=top>BOOL </td><td valign=bottom><a class="el" href="classPSMTPClient.html#a4">BeginMessage</a> (const <a class="el" href="classPString.html">PString</a> &from, const <a class="el" href="classPString.html">PString</a> &to, BOOL <a class="el" href="classPSMTPClient.html#n2">eightBitMIME</a>=FALSE)</td></tr><tr><td nowrap align=right valign=top>BOOL </td><td valign=bottom><a class="el" href="classPSMTPClient.html#a5">BeginMessage</a> (const <a class="el" href="classPString.html">PString</a> &from, const <a class="el" href="classPStringList.html">PStringList</a> &toList, BOOL <a class="el" href="classPSMTPClient.html#n2">eightBitMIME</a>=FALSE)</td></tr><tr><td nowrap align=right valign=top>BOOL </td><td valign=bottom><a class="el" href="classPSMTPClient.html#a6">EndMessage</a> ()</td></tr><tr><td colspan=2><br><h2>Protected Methods</h2></td></tr><tr><td nowrap align=right valign=top>BOOL </td><td valign=bottom><a class="el" href="classPSMTPClient.html#b0">OnOpen</a> ()</td></tr><tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr><tr><td nowrap align=right valign=top>BOOL </td><td valign=bottom><a class="el" href="classPSMTPClient.html#n0">haveHello</a></td></tr><tr><td nowrap align=right valign=top>BOOL </td><td valign=bottom><a class="el" href="classPSMTPClient.html#n1">extendedHello</a></td></tr><tr><td nowrap align=right valign=top>BOOL </td><td valign=bottom><a class="el" href="classPSMTPClient.html#n2">eightBitMIME</a></td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPString.html">PString</a> </td><td valign=bottom><a class="el" href="classPSMTPClient.html#n3">fromAddress</a></td></tr><tr><td nowrap align=right valign=top><a class="el" href="classPStringList.html">PStringList</a> </td><td valign=bottom><a class="el" href="classPSMTPClient.html#n4">toNames</a></td></tr><tr><td nowrap align=right valign=top>BOOL </td><td valign=bottom><a class="el" href="classPSMTPClient.html#n5">sendingData</a></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>A TCP/IP socket for the Simple Mail Transfer Protocol.<p>When acting as a client, the procedure is to make the connection to a remote server, then to send a message using the following procedure: <pre><code> PSMTPSocket mail("mailserver"); if (mail.IsOpen()) { mail.BeginMessage("<a href="mailto:Me@here.com.au">Me@here.com.au</a>", "<a href="mailto:Fred@somwhere.com">Fred@somwhere.com</a>"); mail.Write(myMessage); if (!mail.EndMessage()) PError << "Mail send failed." << endl; } else PError << "Mail conection failed." << endl; </pre></code> <p><hr><h2>Constructor & Destructor Documentation</h2><a name="a0" doxytag="PSMTPClient::PSMTPClient"></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"> PSMTPClient::PSMTPClient </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>Create a TCP/IP SMPTP protocol socket channel. The parameterless form creates an unopened socket, the form with the <code>address</code> parameter makes a connection to a remote system, opening the socket. The form with the <code>socket</code> parameter opens the socket to an incoming call from a "listening" socket. </td> </tr></table><a name="a1" doxytag="PSMTPClient::~PSMTPClient"></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"> PSMTPClient::~PSMTPClient </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>Destroy the channel object. This will close the channel and as a client, QUIT from remote SMTP server. </td> </tr></table><hr><h2>Member Function Documentation</h2><a name="a5" doxytag="PSMTPClient::BeginMessage"></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"> BOOL PSMTPClient::BeginMessage </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classPString.html">PString</a> & </td> <td class="mdname" nowrap> <em>from</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>const <a class="el" href="classPStringList.html">PStringList</a> & </td> <td class="mdname" nowrap> <em>toList</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>BOOL </td> <td class="mdname" nowrap> <em>eightBitMIME</em> = FALSE</td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p> </td> </tr></table><a name="a4" doxytag="PSMTPClient::BeginMessage"></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"> BOOL PSMTPClient::BeginMessage </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const <a class="el" href="classPString.html">PString</a> & </td> <td class="mdname" nowrap> <em>from</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>const <a class="el" href="classPString.html">PString</a> & </td> <td class="mdname" nowrap> <em>to</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md" nowrap>BOOL </td> <td class="mdname" nowrap> <em>eightBitMIME</em> = FALSE</td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Begin transmission of a message using the SMTP socket as a client. This negotiates with the remote server and establishes the protocol state for data transmission. The usual <a class="el" href="classPInternetProtocol.html#a1">Write()</a> or stream commands may then be used to transmit the data itself.<p><dl compact><dt><b>Returns: </b></dt><dd> TRUE if message was handled, FALSE if an error occurs. </dl> </td> </tr></table><a name="a2" doxytag="PSMTPClient::Close"></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"> virtual BOOL PSMTPClient::Close </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> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td><p>Close the socket, and if connected as a client, QUITs from server.<p><dl compact><dt><b>Returns: </b></dt><dd> TRUE if the channel was closed and the QUIT accepted by the server. </dl><p>Reimplemented from <a class="el" href="classPIndirectChannel.html#z157_1">PIndirectChannel</a>. </td> </tr></table><a name="a6" doxytag="PSMTPClient::EndMessage"></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"> BOOL PSMTPClient::EndMessage </td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -