?? pop3.htm
字號:
<p><a href="#GetMessageID"><font face="Arial">CPop3Connection::GetMessageID</font></a></p>
<p> </p>
<p><a name="Noop"></a><big><strong><font face="Arial">CPop3Connection::Noop</font></strong></big></p>
<p><strong><font face="Arial">BOOL CPop3Connection::Noop();</font></strong></p>
<p class="rl"><strong><font face="Arial">Return Value</font></strong></p>
<p class="t"><font face="Arial">If the function succeeds, the return value is TRUE. If the
function fails, the return value is FALSE. To get extended error information, call
::GetLastError.</font></p>
<p><font face="Arial"><strong>Parameters</strong></font></p>
<p><font face="Arial">None.</font></p>
<p><font face="Arial"><strong>Remarks</strong></font></p>
<p><font face="Arial">Issues a "NOOP" command to the server.</font></p>
<p> </p>
<p><a name="GetLastCommandResponse"></a><big><strong><font face="Arial">CPop3Connection::GetLastCommandResponse</font></strong></big></p>
<p><strong><font face="Arial">CString CPop3Connection::GetLastCommandResponse() const;</font></strong></p>
<p class="rl"><strong><font face="Arial">Return Value</font></strong></p>
<p class="t"><font face="Arial">The last command response from the server as a CString.</font></p>
<p><font face="Arial"><strong>Parameters</strong></font></p>
<p><font face="Arial">None.</font></p>
<p><font face="Arial"><strong>Remarks</strong></font></p>
<p><font face="Arial">The CPop3Connection class can return additional text information
along with most errors. This extended error information can be retrieved by using the
GetLastCommandResponse function after an unsuccessful function call. An example of this is
if the Connect function failed because of a validation problem, GetLastCommandResponse
could return something like "-ERR Access is denied". GetLastCommandResponse can
be called multiple times until another CPop3Connection function is called which sends a
POP3 command. </font></p>
<p> </p>
<p><a name="GetTimeout"></a><big><strong><font face="Arial">CPop3Connection::GetTimeout</font></strong></big></p>
<p><strong><font face="Arial">DWORD CPop3Connection::GetTimeout() const;</font></strong></p>
<p class="rl"><strong><font face="Arial">Return Value</font></strong></p>
<p class="t"><font face="Arial">The timeout in milliseconds which the code will wait for
responses from the POP3 server.</font></p>
<p><font face="Arial"><strong>Parameters</strong></font></p>
<p><font face="Arial">None.</font></p>
<p><font face="Arial"><strong>Remarks</strong></font></p>
<p><font face="Arial">Since CPop3Connection provides a synchronous API, a timeout
mechanism is provided. By default the value is 2 seconds in release mode and 20 seconds in
debug mode. The value is larger in debug mode so that the code does not time out when you
are debugging it.</font></p>
<p><strong><font face="Arial">See Also </font></strong></p>
<p><a href="#SetTimeout"><font face="Arial">CPop3Connection::SetTimeout</font></a></p>
<p> </p>
<p><a name="SetTimeout"></a><strong><font face="Arial"><big>CPop3Connection::SetTimeout</big></font></strong></p>
<p><font face="Arial"><strong>void CPop3Connection::SetTimeout(DWORD </strong><em>dwTimeout</em><strong>)
const;</strong></font></p>
<p class="rl"><strong><font face="Arial">Return Value</font></strong></p>
<p class="t"><font face="Arial">None.</font></p>
<p><font face="Arial"><strong>Parameters</strong></font></p>
<p><font face="Arial"><em>dwTimeout</em> The new timeout value in milliseconds.</font></p>
<p><font face="Arial"><strong>Remarks</strong></font></p>
<p><font face="Arial">Sets the timeout to use for connections to the POP3 server.</font></p>
<p><strong><font face="Arial">See Also </font></strong></p>
<p><a href="#GetTimeout"><font face="Arial">CPop3Connection::GetTimeout</font></a></p>
<p> </p>
<p> </p>
<p><a name="GetMessageText" href="#GetMessageText"></a><big><strong><font face="Arial">CPop3Message::GetMessageText</font></strong></big></p>
<p><strong><font face="Arial">LPCSTR </font></strong><font face="Arial"><strong>CPop3Message</strong></font><strong><font face="Arial">::GetMessageText() const;</font></strong></p>
<p class="rl"><strong><font face="Arial">Return Value</font></strong></p>
<p class="t"><font face="Arial">A character pointer to the actual message text this class
instance represents.</font></p>
<p><font face="Arial"><strong>Parameters</strong></font></p>
<p><font face="Arial">None.</font></p>
<p><font face="Arial"><strong>Remarks</strong></font></p>
<p><font face="Arial">Upon a successful call to CPop3Connection::Retrieve, the message
class will contain a message. This function allows the text to of the message to be
accessed.</font></p>
<p><strong><font face="Arial">See Also </font></strong></p>
<p><a href="#Retrieve"><font face="Arial">CPop3Connection::Retrieve</font></a></p>
<p> </p>
<p><a name="GetHeader" href="#GetMessageText"></a><strong><font face="Arial"><big>CPop3Message::GetHeader</big></font></strong></p>
<p><strong><font face="Arial">CString </font></strong><font face="Arial"><strong>CPop3Message</strong></font><strong><font face="Arial">::GetHeader()
const;</font></strong></p>
<p class="rl"><strong><font face="Arial">Return Value</font></strong></p>
<p class="t"><font face="Arial">A CString containing the header of this message</font></p>
<p> </p>
<p><a name="GetBody" href="#GetMessageText"></a><strong><font face="Arial"><big>CPop3Message::GetBody</big></font></strong></p>
<p><strong><font face="Arial">CString </font></strong><font face="Arial"><strong>CPop3Message</strong></font><strong><font face="Arial">::GetBody()
const;</font></strong></p>
<p class="rl"><strong><font face="Arial">Return Value</font></strong></p>
<p class="t"><font face="Arial">A CString containing the body of this message</font></p>
<p> </p>
<p><a name="GetHeaderItem" href="#GetMessageText"></a><strong><font face="Arial"><big>CPop3Message::GetHeaderItem</big></font></strong></p>
<p><strong><font face="Arial">CString </font></strong><font face="Arial"><strong>CPop3Message</strong></font><strong><font face="Arial">::GetHeaderItem(const
CString& sName, int nItem = 0) const;</font></strong></p>
<p class="rl"><strong><font face="Arial">Return Value</font></strong></p>
<p class="t"><font face="Arial">A CString containing the header body of the
header field</font></p>
<p><font face="Arial"><strong>Remarks</strong></font></p>
<p><font face="Arial"> This function allows a specific message header line to be
retrieved e.g you could call the function with sName set to "Date" to
find the date the mail message was sent at. The return value is a CString which
follows the internet convention for that particular header. The nItem parameter
allows you to specify that the n'th occurrence of the header field be returned.</font></p>
<p> </p>
<p><a name="GetReplyTo" href="#GetMessageText"></a><strong><font face="Arial"><big>CPop3Message::GetReplyTo</big></font></strong></p>
<p><strong><font face="Arial">CString </font></strong><font face="Arial"><strong>CPop3Message</strong></font><strong><font face="Arial">::GetReplyTo()
const;</font></strong></p>
<p class="rl"><strong><font face="Arial">Return Value</font></strong></p>
<p class="t"><font face="Arial">A CString containing the Reply to field</font></p>
<p><font face="Arial"><strong>Remarks</strong></font></p>
<p><font face="Arial">Returns the most appropriate address for replies. Looks first for
Reply-To, then From, then Sender, then Return-Path as a last resort, returns the first one of the above that is non-empty.</font></p>
<p> </p>
<p><a name="GetRawBody" href="#GetMessageText"></a><strong><font face="Arial"><big>CPop3Message::GetRawBody</big></font></strong></p>
<p><strong><font face="Arial">LPCSTR </font></strong><font face="Arial"><strong>CPop3Message</strong></font><strong><font face="Arial">::GetRawBody()
const;</font></strong></p>
<p class="rl"><strong><font face="Arial">Return Value</font></strong></p>
<p class="t"><font face="Arial">A const char pointer to the raw message body</font></p>
<p> </p>
<p><a name="GetSubject" href="#GetMessageText"></a><strong><font face="Arial"><big>CPop3Message::GetSubject</big></font></strong></p>
<p><strong><font face="Arial">CString </font></strong><font face="Arial"><strong>CPop3Message</strong></font><strong><font face="Arial">::GetSubject()
const;</font></strong></p>
<p class="rl"><strong><font face="Arial">Return Value</font></strong></p>
<p class="t"><font face="Arial">A CString containing the subject of the message</font></p>
<p><font face="Arial"><strong>Remarks</strong></font></p>
<p><font face="Arial"> Returns the subject of the message.</font></p>
<p> </p>
<p><a name="GetFrom" href="#GetMessageText"></a><strong><font face="Arial"><big>CPop3Message::GetFrom</big></font></strong></p>
<p><strong><font face="Arial">CString </font></strong><font face="Arial"><strong>CPop3Message</strong></font><strong><font face="Arial">::GetFrom()
const;</font></strong></p>
<p class="rl"><strong><font face="Arial">Return Value</font></strong></p>
<p class="t"><font face="Arial">A CString containing the sender of the message</font></p>
<p><font face="Arial"><strong>Remarks</strong></font></p>
<p><font face="Arial"> Returns the sender of the message.</font></p>
<p> </p>
<p><a name="GetDate" href="#GetMessageText"></a><strong><font face="Arial"><big>CPop3Message::GetDate</big></font></strong></p>
<p><strong><font face="Arial">CString </font></strong><font face="Arial"><strong>CPop3Message</strong></font><strong><font face="Arial">::GetDate()
const;</font></strong></p>
<p class="rl"><strong><font face="Arial">Return Value</font></strong></p>
<p class="t"><font face="Arial">A CString containing the "Date:"
header of the message</font></p>
<p><font face="Arial"><strong>Remarks</strong></font></p>
<p><font face="Arial"> Returns the "Date:" header of the message.</font></p>
<p> </p>
<p> </p>
<p> </p>
<p><font face="Arial"><big><a name="Enhancements"></a></big><font color="#000000" size="4"><strong>PLANNED
ENHANCEMENTS</strong></font> </font>
<ul>
<li><font face="Arial">Implement support for the APOP command.</font></li>
<li><font face="Arial">Package the code up into an OCX, COM Interface or DLL to allow non
MFC apps to use the code.</font></li>
<li><font face="Arial">Provide a better sample app. At the moment, it's very much a test
program which tests all of the functions.</font></li>
<li><font face="Arial" color="#000000" size="3">If you have any other suggested
improvements, please let me know so that I can incorporate them into the next release.</font></li>
</ul>
<p> </p>
<p> </p>
<p> </p>
<p><font face="Arial"><a name="Contact"></a><font color="#000000" size="4"><strong>CONTACTING
THE AUTHOR</strong></font></font></p>
<p><font face="Arial" color="#000000" size="3">PJ Naughter<br>
Email: <a href="mailto:pjn@indigo..ie">pjn@indigo.ie</a><br>
Web: <a href="http://indigo.ie/~pjn">http://indigo.ie/~pjn</a><br>
24th August 1999</font></p>
</body>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -