Difference between revisions of "Unit SMTP"

From Ultibo.org
Jump to: navigation, search
Line 30: Line 30:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SMTP status constants''' <code> SMTP_STATUS_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SMTP status''' <code> SMTP_STATUS_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 67: Line 67:
 
<br />
 
<br />
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SMTP command constants''' <code> SMTP_COMMAND_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SMTP command''' <code> SMTP_COMMAND_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 111: Line 111:
 
<br />  
 
<br />  
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SMTP sub command constants''' <code> SMTP_SUB_COMMAND_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SMTP sub command''' <code> SMTP_SUB_COMMAND_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 125: Line 125:
 
<br />  
 
<br />  
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SMTP string constants''' <code> SMTP_STRING_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SMTP string''' <code> SMTP_STRING_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 294: Line 294:
 
<br />  
 
<br />  
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
 
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;">
<div style="font-size: 14px; padding-left: 12px;">'''SMTP logging constants''' <code> SMTP_LOG_* </code></div>
+
<div style="font-size: 14px; padding-left: 12px;">'''SMTP logging''' <code> SMTP_LOG_* </code></div>
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;">
 
{| class="wikitable" style="font-size: 14px; background: white;"
 
{| class="wikitable" style="font-size: 14px; background: white;"
Line 1,026: Line 1,026:
 
|-
 
|-
 
| <code>SMTP_DEFAULT_LOG_LEVEL:LongWord = SMTP_LOG_LEVEL_DEBUG;</code>
 
| <code>SMTP_DEFAULT_LOG_LEVEL:LongWord = SMTP_LOG_LEVEL_DEBUG;</code>
| style="width: 65%;"|Minimum level for SMTP messages. Only messages with level greater than or equal to this will be printed.
+
| style="width: 40%;"|Minimum level for SMTP messages. Only messages with level greater than or equal to this will be printed.
 
|-
 
|-
 
|}
 
|}
Line 1,032: Line 1,032:
 
|-
 
|-
 
| <code>SMTP_LOG_ENABLED:Boolean;</code>
 
| <code>SMTP_LOG_ENABLED:Boolean;</code>
| style="width: 65%;"|
+
| style="width: 40%;"|
 
|-
 
|-
 
|}
 
|}

Revision as of 03:53, 27 March 2017

Return to Unit Reference


Description


Ultibo SMTP interface unit

To be documented

Constants



[Expand]
SMTP specific constants SMTP_*


[Expand]
SMTP status SMTP_STATUS_*


[Expand]
SMTP command SMTP_COMMAND_*


[Expand]
SMTP sub command SMTP_SUB_COMMAND_*


[Expand]
SMTP string SMTP_STRING_*


[Expand]
SMTP logging SMTP_LOG_*


Type definitions



SMTP client notify event

TSMTPClientNotifyEvent = procedure(const ARequest:String) of Object;

SMTP host event

TSMTPHostEvent = function(AConnection:TSMTPConnection):Boolean of Object;

SMTP count event

TSMTPCountEvent = function(AConnection:TSMTPConnection):Boolean of Object;

SMTP notify event

TSMTPNotifyEvent = procedure(AConnection:TSMTPConnection; const ARequest:String) of Object;

SMTP request event

TSMTPRequestEvent = function(AConnection:TSMTPConnection; const ARequest:String; var AReply:String):Boolean of Object;

SMTP authenticate event

TSMTPAuthenticateEvent = function(AConnection:TSMTPConnection; const AMethod,AUsername,APassword:String; var AReply:String):Boolean of Object;

SMTP connection event

TSMTPConnectionEvent = procedure(AConnection:TSMTPConnection) of Object;


Class definitions



SMTP buffer

[Expand]

TSMTPBuffer = class(TObject)

SMTP client

[Expand]

TSMTPClient = class(TWinsock2TCPClient)

SMTP connection

[Expand]

TSMTPConnection = class(TListObject)

SMTP listener

[Expand]

TSMTPListener = class(TWinsock2TCPListener)


Public variables



SMTP logging

SMTP_DEFAULT_LOG_LEVEL:LongWord = SMTP_LOG_LEVEL_DEBUG; Minimum level for SMTP messages. Only messages with level greater than or equal to this will be printed.
SMTP_LOG_ENABLED:Boolean;


Function declarations



Initialization functions

[Expand]
procedure SMTPInit;
Description: To be documented


SMTP helper functions

[Expand]
procedure SMTPLog(Level:LongWord; const AText:String);
Description: To be documented


[Expand]
procedure SMTPLogInfo(const AText:String);
Description: To be documented


[Expand]
procedure SMTPLogError(const AText:String);
Description: To be documented


[Expand]
procedure SMTPLogDebug(const AText:String);
Description: To be documented


Return to Unit Reference