📄 inetmail_8h-source.html
字号:
00224 BOOL <a class="code" href="classPSMTPClient.html#a4">BeginMessage</a>(00225 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & from, <span class="comment">// User name of sender.</span>00226 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & to, <span class="comment">// User name of recipient.</span>00227 BOOL <a class="code" href="classPSMTPClient.html#n2">eightBitMIME</a> = FALSE <span class="comment">// Mesage will be 8 bit MIME.</span>00228 );00229 BOOL <a class="code" href="classPSMTPClient.html#a4">BeginMessage</a>(00230 <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & from, <span class="comment">// User name of sender.</span>00231 <span class="keyword">const</span> <a class="code" href="classPStringList.html">PStringList</a> & toList, <span class="comment">// List of user names of recipients.</span>00232 BOOL <a class="code" href="classPSMTPClient.html#n2">eightBitMIME</a> = FALSE <span class="comment">// Mesage will be 8 bit MIME.</span>00233 );00234 00240 BOOL <a class="code" href="classPSMTPClient.html#a6">EndMessage</a>();00241 00242 00243 <span class="keyword">protected</span>:00244 BOOL <a class="code" href="classPSMTPClient.html#b0">OnOpen</a>();00245 <a name="l00246"></a><a class="code" href="classPSMTPClient.html#n0">00246</a> BOOL <a class="code" href="classPSMTPClient.html#n0">haveHello</a>;<a name="l00247"></a><a class="code" href="classPSMTPClient.html#n1">00247</a> BOOL <a class="code" href="classPSMTPClient.html#n1">extendedHello</a>;<a name="l00248"></a><a class="code" href="classPSMTPClient.html#n2">00248</a> BOOL <a class="code" href="classPSMTPClient.html#n2">eightBitMIME</a>;<a name="l00249"></a><a class="code" href="classPSMTPClient.html#n3">00249</a> <a class="code" href="classPString.html">PString</a> <a class="code" href="classPSMTPClient.html#n3">fromAddress</a>;<a name="l00250"></a><a class="code" href="classPSMTPClient.html#n4">00250</a> <a class="code" href="classPStringList.html">PStringList</a> <a class="code" href="classPSMTPClient.html#n4">toNames</a>;<a name="l00251"></a><a class="code" href="classPSMTPClient.html#n5">00251</a> BOOL <a class="code" href="classPSMTPClient.html#n5">sendingData</a>;00252 00253 <span class="keyword">private</span>:00254 BOOL _BeginMessage();00255 };00256 00257 <a name="l00283"></a><a class="code" href="classPSMTPServer.html">00283</a> <span class="keyword">class </span><a class="code" href="classPSMTPServer.html">PSMTPServer</a> : <span class="keyword">public</span> <a class="code" href="classPSMTP.html">PSMTP</a>00284 {00285 <a class="code" href="object_8h.html#a27">PCLASSINFO</a>(<a class="code" href="classPSMTPServer.html">PSMTPServer</a>, <a class="code" href="classPSMTP.html">PSMTP</a>)00286 00287 <span class="keyword">public</span>:00294 <a class="code" href="classPSMTPServer.html#a0">PSMTPServer</a>();00295 00296 00297 <span class="comment">// New functions for class.</span>00305 <span class="comment"></span> BOOL <a class="code" href="classPSMTPServer.html#a1">ProcessCommand</a>();00306 00307 <span class="keywordtype">void</span> <a class="code" href="classPSMTPServer.html#a2">ServerReset</a>();00308 <span class="comment">// Reset the state of the SMTP server socket.</span>00309 <a name="l00310"></a><a class="code" href="classPSMTPServer.html#s7">00310</a> <span class="keyword">enum</span> <a class="code" href="classPSMTPServer.html#s7">ForwardResult</a> {00311 <a class="code" href="classPSMTPServer.html#s7s0">LocalDomain</a>, <span class="comment">// User may be on local machine, do LookUpName().</span>00312 <a class="code" href="classPSMTPServer.html#s7s1">WillForward</a>, <span class="comment">// User may be forwarded to another SMTP host.</span>00313 <a class="code" href="classPSMTPServer.html#s7s2">CannotForward</a> <span class="comment">// User cannot be forwarded.</span>00314 };00315 <span class="comment">// Result of forward check</span>00316 00323 <span class="keyword">virtual</span> <a class="code" href="classPSMTPServer.html#s7">ForwardResult</a> <a class="code" href="classPSMTPServer.html#a3">ForwardDomain</a>(00324 <a class="code" href="classPCaselessString.html">PCaselessString</a> & userDomain, <span class="comment">// Domain for user</span>00325 <a class="code" href="classPCaselessString.html">PCaselessString</a> & forwardDomainList <span class="comment">// Domains forwarding to</span>00326 );00327 <a name="l00328"></a><a class="code" href="classPSMTPServer.html#s8">00328</a> <span class="keyword">enum</span> <a class="code" href="classPSMTPServer.html#s8">LookUpResult</a> {00329 <a class="code" href="classPSMTPServer.html#s8s3">ValidUser</a>, <span class="comment">// User name was valid and unique.</span>00330 <a class="code" href="classPSMTPServer.html#s8s4">AmbiguousUser</a>, <span class="comment">// User name was valid but ambiguous.</span>00331 <a class="code" href="classPSMTPServer.html#s8s5">UnknownUser</a>, <span class="comment">// User name was invalid.</span>00332 <a class="code" href="classPSMTPServer.html#s8s6">LookUpError</a> <span class="comment">// Some other error occurred in look up.</span>00333 };00334 <span class="comment">// Result of user name look up</span>00335 00343 <span class="keyword">virtual</span> <a class="code" href="classPSMTPServer.html#s8">LookUpResult</a> <a class="code" href="classPSMTPServer.html#a4">LookUpName</a>(00344 <span class="keyword">const</span> <a class="code" href="classPCaselessString.html">PCaselessString</a> & name, <span class="comment">// Name to look up.</span>00345 <a class="code" href="classPString.html">PString</a> & expandedName <span class="comment">// Expanded form of name (if found).</span>00346 );00347 00357 <span class="keyword">virtual</span> BOOL <a class="code" href="classPSMTPServer.html#a5">HandleMessage</a>(00358 <a class="code" href="classPCharArray.html">PCharArray</a> & buffer, <span class="comment">// Buffer containing message data received.</span>00359 BOOL starting, <span class="comment">// This is the first call for the message.</span>00360 BOOL completed <span class="comment">// This is the last call for the message.</span>00361 <span class="comment">// Indication that the entire message has been received.</span>00362 );00363 00364 00365 <span class="keyword">protected</span>:00366 BOOL <a class="code" href="classPSMTPServer.html#b0">OnOpen</a>();00367 00368 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPSMTPServer.html#b1">OnHELO</a>(00369 <span class="keyword">const</span> <a class="code" href="classPCaselessString.html">PCaselessString</a> & remoteHost <span class="comment">// Name of remote host.</span>00370 );00371 <span class="comment">// Start connection.</span>00372 00373 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPSMTPServer.html#b2">OnEHLO</a>(00374 <span class="keyword">const</span> <a class="code" href="classPCaselessString.html">PCaselessString</a> & remoteHost <span class="comment">// Name of remote host.</span>00375 );00376 <span class="comment">// Start extended SMTP connection.</span>00377 00378 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPSMTPServer.html#b3">OnQUIT</a>();00379 <span class="comment">// close connection and die.</span>00380 00381 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPSMTPServer.html#b4">OnHELP</a>();00382 <span class="comment">// get help.</span>00383 00384 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPSMTPServer.html#b5">OnNOOP</a>();00385 <span class="comment">// do nothing</span>00386 00387 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPSMTPServer.html#b6">OnTURN</a>();00388 <span class="comment">// switch places</span>00389 00390 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPSMTPServer.html#b7">OnRSET</a>();00391 <span class="comment">// Reset state.</span>00392 00393 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPSMTPServer.html#b8">OnVRFY</a>(00394 <span class="keyword">const</span> <a class="code" href="classPCaselessString.html">PCaselessString</a> & name <span class="comment">// Name to verify.</span>00395 );00396 <span class="comment">// Verify address.</span>00397 00398 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPSMTPServer.html#b9">OnEXPN</a>(00399 <span class="keyword">const</span> <a class="code" href="classPCaselessString.html">PCaselessString</a> & name <span class="comment">// Name to expand.</span>00400 );00401 <span class="comment">// Expand alias.</span>00402 00403 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPSMTPServer.html#b10">OnRCPT</a>(00404 <span class="keyword">const</span> <a class="code" href="classPCaselessString.html">PCaselessString</a> & recipient <span class="comment">// Name of recipient.</span>00405 );00406 <span class="comment">// Designate recipient</span>00407 00408 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPSMTPServer.html#b11">OnMAIL</a>(00409 <span class="keyword">const</span> <a class="code" href="classPCaselessString.html">PCaselessString</a> & sender <span class="comment">// Name of sender.</span>00410 );00411 <span class="comment">// Designate sender</span>00412 00413 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPSMTPServer.html#b12">OnSEND</a>(00414 <span class="keyword">const</span> <a class="code" href="classPCaselessString.html">PCaselessString</a> & sender <span class="comment">// Name of sender.</span>00415 );00416 <span class="comment">// send message to screen</span>00417 00418 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPSMTPServer.html#b13">OnSAML</a>(00419 <span class="keyword">const</span> <a class="code" href="classPCaselessString.html">PCaselessString</a> & sender <span class="comment">// Name of sender.</span>00420 );00421 <span class="comment">// send AND mail</span>00422 00423 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPSMTPServer.html#b14">OnSOML</a>(00424 <span class="keyword">const</span> <a class="code" href="classPCaselessString.html">PCaselessString</a> & sender <span class="comment">// Name of sender.</span>00425 );00426 <span class="comment">// send OR mail</span>00427 00428 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPSMTPServer.html#b15">OnDATA</a>();00429 <span class="comment">// Message text.</span>00430 00437 <span class="keyword">virtual</span> BOOL <a class="code" href="classPSMTPServer.html#b16">OnUnknown</a>(00438 <span class="keyword">const</span> <a class="code" href="classPCaselessString.html">PCaselessString</a> & command <span class="comment">// Complete command line received.</span>00439 );00440 00441 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classPSMTPServer.html#b17">OnSendMail</a>(00442 <span class="keyword">const</span> <a class="code" href="classPCaselessString.html">PCaselessString</a> & sender <span class="comment">// Name of sender.</span>00443 );00444 <span class="comment">// Common code for OnMAIL(), OnSEND(), OnSOML() and OnSAML() funtions.</span>00445 00457 <span class="keyword">virtual</span> BOOL <a class="code" href="classPSMTPServer.html#b18">OnTextData</a>(<a class="code" href="classPCharArray.html">PCharArray</a> & buffer, BOOL & completed);00458 00470 <span class="keyword">virtual</span> BOOL <a class="code" href="classPSMTPServer.html#b19">OnMIMEData</a>(<a class="code" href="classPCharArray.html">PCharArray</a> & buffer, BOOL & completed);00471 00472 00473 <span class="comment">// Member variables</span><a name="l00474"></a><a class="code" href="classPSMTPServer.html#n0">00474</a> BOOL <a class="code" href="classPSMTPServer.html#n0">extendedHello</a>;<a name="l00475"></a><a class="code" href="classPSMTPServer.html#n1">00475</a> BOOL <a class="code" href="classPSMTPServer.html#n1">eightBitMIME</a>;<a name="l00476"></a><a class="code" href="classPSMTPServer.html#n2">00476</a> <a class="code" href="classPString.html">PString</a> <a class="code" href="classPSMTPServer.html#n2">fromAddress</a>;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -