Class TSMTPSend

DescriptionHierarchyFieldsMethodsProperties

Unit

smtpsend

Declaration

type TSMTPSend = class(TSynaClient)

Description

Implementation of SMTP and ESMTP procotol

, include some ESMTP extensions, include SSL/TLS too.

Note: Are you missing properties for setting Username and Password for ESMTP? Look to parent TSynaClient object!

Are you missing properties for specify server address and port? Look to parent TSynaClient too!

Hierarchy

TSMTPSend > TSynaClient > TObject

Methods

Overview

Public constructor Create;
Public destructor Destroy; override;
Public function EnhCodeString: string;
Public function Etrn(const Value: string): Boolean;
Public function FindCap(const Value: string): string;
Public function Login: Boolean;
Public function Logout: Boolean;
Public function MailData(const Value: Tstrings): Boolean;
Public function MailFrom(const Value: string; Size: Integer): Boolean;
Public function MailTo(const Value: string): Boolean;
Public function NoOp: Boolean;
Public function Reset: Boolean;
Public function StartTLS: Boolean;
Public function Verify(const Value: string): Boolean;

Description

Public constructor Create;

 

Public destructor Destroy; override;

 

Public function EnhCodeString: string;

Return string descriptive text for enhanced result codes stored in EnhCode1, EnhCode2 and EnhCode3.

Public function Etrn(const Value: string): Boolean;

Send ETRN SMTP command for start sending of remote queue for domain in Value. If all OK, result is True, else result is False.

Public function FindCap(const Value: string): string;

Try to find specified capability in ESMTP response.

Public function Login: Boolean;

Connects to SMTP server (defined in TargetHost) and begin SMTP session. (First try ESMTP EHLO, next old HELO handshake). Parses ESMTP capabilites and if you specified Username and password and remote server can handle AUTH command, try login by AUTH command. Preffered login method is CRAM-MD5 (if safer!). If all OK, result is True, else result is False.

Public function Logout: Boolean;

Close SMTP session (QUIT command) and disconnect from SMTP server.

Public function MailData(const Value: Tstrings): Boolean;

Send DATA SMTP command and transmit message data. If all OK, result is True, else result is False.

Public function MailFrom(const Value: string; Size: Integer): Boolean;

Send MAIL FROM SMTP command for set sender e-mail address. If sender's e-mail address is empty string, transmited message is error message.

If size not 0 and remote server can handle SIZE parameter, append SIZE parameter to request. If all OK, result is True, else result is False.

Public function MailTo(const Value: string): Boolean;

Send RCPT TO SMTP command for set receiver e-mail address. It cannot be an empty string. If all OK, result is True, else result is False.

Public function NoOp: Boolean;

Send NOOP SMTP command for keep SMTP session. If all OK, result is True, else result is False.

Public function Reset: Boolean;

Send RSET SMTP command for reset SMTP session. If all OK, result is True, else result is False.

Public function StartTLS: Boolean;

Call STARTTLS command for upgrade connection to SSL/TLS mode.

Public function Verify(const Value: string): Boolean;

Send VRFY SMTP command for check receiver e-mail address. It cannot be an empty string. If all OK, result is True, else result is False.

Properties

Overview

Published property AuthDone: Boolean;
Published property AutoTLS: Boolean;
Published property EnhCode1: Integer;
Published property EnhCode2: Integer;
Published property EnhCode3: Integer;
Published property ESMTP: Boolean;
Published property ESMTPcap: TStringList;
Published property ESMTPSize: Boolean;
Published property FullResult: TStringList;
Published property FullSSL: Boolean;
Published property MaxSize: Integer;
Published property ResultCode: Integer;
Published property ResultString: string;
Published property Sock: TTCPBlockSocket;
Published property SystemName: string;

Description

Published property AuthDone: Boolean;

True if you successfuly pass authorisation to remote server.

Published property AutoTLS: Boolean;

If is set to true, then upgrade to SSL/TLS mode if remote server support it.

Published property EnhCode1: Integer;

First digit of Enhanced result code. If last operation does not have enhanced result code, values is 0.

Published property EnhCode2: Integer;

Second digit of Enhanced result code. If last operation does not have enhanced result code, values is 0.

Published property EnhCode3: Integer;

Third digit of Enhanced result code. If last operation does not have enhanced result code, values is 0.

Published property ESMTP: Boolean;

True if you successfuly logged to ESMTP server.

Published property ESMTPcap: TStringList;

List of ESMTP capabilites of remote ESMTP server. (If you connect to ESMTP server only!).

Published property ESMTPSize: Boolean;

True if remote server can handle SIZE parameter.

Published property FullResult: TStringList;

All result strings of last SMTP command (result is maybe multiline!).

Published property FullSSL: Boolean;

SSL/TLS mode is used from first contact to server. Servers with full SSL/TLS mode usualy using non-standard TCP port!

Published property MaxSize: Integer;

When ESMTPSize is True, contains max length of message that remote server can handle.

Published property ResultCode: Integer;

result code of last SMTP command.

Published property ResultString: string;

result string of last SMTP command (begin with string representation of result code).

Published property Sock: TTCPBlockSocket;

Socket object used for TCP/IP operation. Good for seting OnStatus hook, etc.

Published property SystemName: string;

name of our system used in HELO and EHLO command. Implicit value is internet address of your machine.


Generated by PasDoc 0.8.8.2 on 2005-01-19 20:01:19