📄 inetmail_8h-source.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>inetmail.h Source File</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>inetmail.h</h1><a href="inetmail_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/*</span>00002 <span class="comment"> * inetmail.h</span>00003 <span class="comment"> *</span>00004 <span class="comment"> * Internet Mail channel classes</span>00005 <span class="comment"> * Simple Mail Transport Protocol & Post Office Protocol v3</span>00006 <span class="comment"> *</span>00007 <span class="comment"> * Portable Windows Library</span>00008 <span class="comment"> *</span>00009 <span class="comment"> * Copyright (c) 1993-2002 Equivalence Pty. Ltd.</span>00010 <span class="comment"> *</span>00011 <span class="comment"> * The contents of this file are subject to the Mozilla Public License</span>00012 <span class="comment"> * Version 1.0 (the "License"); you may not use this file except in</span>00013 <span class="comment"> * compliance with the License. You may obtain a copy of the License at</span>00014 <span class="comment"> * http://www.mozilla.org/MPL/</span>00015 <span class="comment"> *</span>00016 <span class="comment"> * Software distributed under the License is distributed on an "AS IS"</span>00017 <span class="comment"> * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See</span>00018 <span class="comment"> * the License for the specific language governing rights and limitations</span>00019 <span class="comment"> * under the License.</span>00020 <span class="comment"> *</span>00021 <span class="comment"> * The Original Code is Portable Windows Library.</span>00022 <span class="comment"> *</span>00023 <span class="comment"> * The Initial Developer of the Original Code is Equivalence Pty. Ltd.</span>00024 <span class="comment"> *</span>00025 <span class="comment"> * Contributor(s): Federico Pinna and Reitek S.p.A.</span>00026 <span class="comment"> *</span>00027 <span class="comment"> * $Log: inetmail.h,v $</span>00028 <span class="comment"> * Revision 1.19 2004/04/21 00:29:55 csoutheren</span>00029 <span class="comment"> * Added SASL authentication to PPOP3Client and PSMTPClient</span>00030 <span class="comment"> * Thanks to Federico Pinna and Reitek S.p.A.</span>00031 <span class="comment"> *</span>00032 <span class="comment"> * Revision 1.18 2002/11/06 22:47:24 robertj</span>00033 <span class="comment"> * Fixed header comment (copyright etc)</span>00034 <span class="comment"> *</span>00035 <span class="comment"> * Revision 1.17 2002/09/16 01:08:59 robertj</span>00036 <span class="comment"> * Added #define so can select if #pragma interface/implementation is used on</span>00037 <span class="comment"> * platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan.</span>00038 <span class="comment"> *</span>00039 <span class="comment"> * Revision 1.16 2000/11/10 01:08:11 robertj</span>00040 <span class="comment"> * Added content transfer encoding and automatic base64 translation.</span>00041 <span class="comment"> *</span>00042 <span class="comment"> * Revision 1.15 2000/11/09 06:01:58 robertj</span>00043 <span class="comment"> * Added MIME version and content disposition to RFC822 class.</span>00044 <span class="comment"> *</span>00045 <span class="comment"> * Revision 1.14 2000/11/09 05:50:23 robertj</span>00046 <span class="comment"> * Added RFC822 aware channel class for doing internet mail.</span>00047 <span class="comment"> *</span>00048 <span class="comment"> * Revision 1.13 2000/06/21 01:01:21 robertj</span>00049 <span class="comment"> * AIX port, thanks Wolfgang Platzer (wolfgang.platzer@infonova.at).</span>00050 <span class="comment"> *</span>00051 <span class="comment"> * Revision 1.12 2000/06/19 11:33:53 robertj</span>00052 <span class="comment"> * Fixed incorrect comment documentation</span>00053 <span class="comment"> *</span>00054 <span class="comment"> * Revision 1.11 1999/03/09 08:01:46 robertj</span>00055 <span class="comment"> * Changed comments for doc++ support (more to come).</span>00056 <span class="comment"> *</span>00057 <span class="comment"> * Revision 1.10 1999/02/16 08:07:10 robertj</span>00058 <span class="comment"> * MSVC 6.0 compatibility changes.</span>00059 <span class="comment"> *</span>00060 <span class="comment"> * Revision 1.9 1998/11/30 02:50:51 robertj</span>00061 <span class="comment"> * New directory structure</span>00062 <span class="comment"> *</span>00063 <span class="comment"> * Revision 1.8 1998/09/23 06:19:36 robertj</span>00064 <span class="comment"> * Added open source copyright license.</span>00065 <span class="comment"> *</span>00066 <span class="comment"> * Revision 1.7 1996/12/21 01:24:15 robertj</span>00067 <span class="comment"> * Added missing open message to pop server.</span>00068 <span class="comment"> *</span>00069 <span class="comment"> * Revision 1.6 1996/09/16 12:57:45 robertj</span>00070 <span class="comment"> * Removed redundant functions.</span>00071 <span class="comment"> *</span>00072 <span class="comment"> * Revision 1.5 1996/09/14 13:17:59 robertj</span>00073 <span class="comment"> * Renamed file and changed to be a protocol off new indirect channel to separate</span>00074 <span class="comment"> * the protocol from the low level byte transport channel.</span>00075 <span class="comment"> *</span>00076 <span class="comment"> * Revision 1.4 1996/07/27 04:14:49 robertj</span>00077 <span class="comment"> * Redesign and reimplement of mail sockets.</span>00078 <span class="comment"> *</span>00079 <span class="comment"> * Revision 1.3 1996/06/28 13:16:32 robertj</span>00080 <span class="comment"> * Changed SMTP incoming message handler so can tell when started, processing or ended message.</span>00081 <span class="comment"> *</span>00082 <span class="comment"> * Revision 1.2 1996/03/16 04:38:24 robertj</span>00083 <span class="comment"> * Added ParseReponse() for splitting reponse line into code and info.</span>00084 <span class="comment"> *</span>00085 <span class="comment"> * Revision 1.1 1996/01/23 13:04:20 robertj</span>00086 <span class="comment"> * Initial revision</span>00087 <span class="comment"> *</span>00088 <span class="comment"> * Revision 1.3 1995/06/17 11:12:15 robertj</span>00089 <span class="comment"> * Documentation update.</span>00090 <span class="comment"> *</span>00091 <span class="comment"> * Revision 1.2 1995/06/17 00:39:53 robertj</span>00092 <span class="comment"> * More implementation.</span>00093 <span class="comment"> *</span>00094 <span class="comment"> * Revision 1.1 1995/06/04 13:17:16 robertj</span>00095 <span class="comment"> * Initial revision</span>00096 <span class="comment"> *</span>00097 <span class="comment"> */</span>00098 00099 <span class="preprocessor">#ifndef _PMAILPROTOCOL</span>00100 <span class="preprocessor"></span><span class="preprocessor">#define _PMAILPROTOCOL</span>00101 <span class="preprocessor"></span>00102 <span class="preprocessor">#ifdef P_USE_PRAGMA</span>00103 <span class="preprocessor"></span><span class="preprocessor">#pragma interface</span>00104 <span class="preprocessor"></span><span class="preprocessor">#endif</span>00105 <span class="preprocessor"></span>00106 <span class="preprocessor">#include <<a class="code" href="inetprot_8h.html">ptclib/inetprot.h</a>></span>00107 <span class="preprocessor">#include <<a class="code" href="mime_8h.html">ptclib/mime.h</a>></span>00108 00109 <span class="keyword">class </span><a class="code" href="classPSocket.html">PSocket</a>;00110 00111 00113 <span class="comment">// PSMTP</span>00114 <a name="l00140"></a><a class="code" href="classPSMTP.html">00140</a> <span class="keyword">class </span><a class="code" href="classPSMTP.html">PSMTP</a> : <span class="keyword">public</span> <a class="code" href="classPInternetProtocol.html">PInternetProtocol</a>00141 {00142 <a class="code" href="object_8h.html#a27">PCLASSINFO</a>(<a class="code" href="classPSMTP.html">PSMTP</a>, <a class="code" href="classPInternetProtocol.html">PInternetProtocol</a>)00143 00144 <span class="keyword">public</span>:00145 <span class="comment">// New functions for class.</span><a name="l00146"></a><a class="code" href="classPSMTP.html#s17">00146</a> <span class="keyword">enum</span> <a class="code" href="classPSMTP.html#s17">Commands</a> {00147 <a class="code" href="classPSMTP.html#s17s0">HELO</a>, <a class="code" href="classPSMTP.html#s17s1">EHLO</a>, <a class="code" href="classPSMTP.html#s17s2">QUIT</a>, <a class="code" href="classPSMTP.html#s17s3">HELP</a>, <a class="code" href="classPSMTP.html#s17s4">NOOP</a>,00148 <a class="code" href="classPSMTP.html#s17s5">TURN</a>, <a class="code" href="classPSMTP.html#s17s6">RSET</a>, <a class="code" href="classPSMTP.html#s17s7">VRFY</a>, <a class="code" href="classPSMTP.html#s17s8">EXPN</a>, <a class="code" href="classPSMTP.html#s17s9">RCPT</a>,00149 <a class="code" href="classPSMTP.html#s17s10">MAIL</a>, <a class="code" href="classPSMTP.html#s17s11">SEND</a>, <a class="code" href="classPSMTP.html#s17s12">SAML</a>, <a class="code" href="classPSMTP.html#s17s13">SOML</a>, <a class="code" href="classPSMTP.html#s17s14">DATA</a>,00150 <a class="code" href="classPSMTP.html#s17s15">AUTH</a>, <a class="code" href="classPSMTP.html#s17s16">NumCommands</a>00151 };00152 00153 <span class="keyword">protected</span>:00154 <a class="code" href="classPSMTP.html#b0">PSMTP</a>();00155 <span class="comment">// Create a new SMTP protocol channel.</span>00156 };00157 00158 <a name="l00175"></a><a class="code" href="classPSMTPClient.html">00175</a> <span class="keyword">class </span><a class="code" href="classPSMTPClient.html">PSMTPClient</a> : <span class="keyword">public</span> <a class="code" href="classPSMTP.html">PSMTP</a>00176 {00177 <a class="code" href="object_8h.html#a27">PCLASSINFO</a>(<a class="code" href="classPSMTPClient.html">PSMTPClient</a>, <a class="code" href="classPSMTP.html">PSMTP</a>)00178 00179 <span class="keyword">public</span>:00186 <a class="code" href="classPSMTPClient.html#a0">PSMTPClient</a>();00187 00191 <a class="code" href="classPSMTPClient.html#a1">~PSMTPClient</a>();00192 00193 00194 <span class="comment">// Overrides from class PChannel.</span>00200 <span class="comment"></span> <span class="keyword">virtual</span> BOOL <a class="code" href="classPSMTPClient.html#a2">Close</a>();00201 00202 00203 <span class="comment">// New functions for class.</span>00211 <span class="comment"></span> BOOL <a class="code" href="classPSMTPClient.html#a3">LogIn</a>(00212 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & username, <span class="comment">// User name on remote system.</span>00213 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & password <span class="comment">// Password for user name.</span>00214 );00215
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -