Difference between revisions of "TSmtpCli"

From Overbyte
Jump to navigation Jump to search
Line 8: Line 8:
 
AUTH LOGIN, AUTH PLAIN, AUTH CRAM-MD5 and AUTH CRAM-SHA1 (RFC [http://rfc.net/rfc2554.html 2554] as well as RFC [http://rfc.net/rfc1734.html 1734]).
 
AUTH LOGIN, AUTH PLAIN, AUTH CRAM-MD5 and AUTH CRAM-SHA1 (RFC [http://rfc.net/rfc2554.html 2554] as well as RFC [http://rfc.net/rfc1734.html 1734]).
 
The TSmtpCli is working '''non-blocking''', a synchronously working counterpart is also available, see [[TSyncSmtpCli | TSyncSmtpCli]].
 
The TSmtpCli is working '''non-blocking''', a synchronously working counterpart is also available, see [[TSyncSmtpCli | TSyncSmtpCli]].
 
== Methods ==
 
 
{|
 
| width="140" valign="top" | [[TSmtpCli.Abort | Abort]] |||| Cancel any transactions in progress, close server connection.
 
|-
 
| valign="top" | [[TSmtpCli.Auth | Auth]] |||| Send SMTP command '''AUTH''' starting the authentication process.
 
|-
 
| valign="top" | [[TSmtpCli.Connect | Connect]] |||| Connect to the mail server.
 
|-
 
| valign="top" | [[TSmtpCli.Create | Create]] |||| Constructor
 
|-
 
| valign="top" | [[TSmtpCli.Data | Data]] |||| Send SMTP command '''DATA'''.
 
|-
 
| valign="top" | [[TSmtpCli.Destroy | Destroy]] |||| Destructor
 
|-
 
| valign="top" | [[TSmtpCli.Ehlo | Ehlo]] |||| Send SMTP command '''EHLO'''.
 
|-
 
| valign="top" | [[TSmtpCli.Helo | Helo]] |||| Send SMTP command '''HELO'''.
 
|-
 
| valign="top" | [[TSmtpCli.HighLevelAsync | HighLevelAsync]] |||| Execute multiple commands consecutively
 
|-
 
| valign="top" | [[TSmtpCli.Mail | Mail]] |||| Execute methods [[TSmtpCli.MailFrom | MailFrom]], [[TSmtpCli.RcptTo | RcptTo]], and [[TSmtpCli.Data | Data]] consecutively.
 
|-
 
| valign="top" | [[TSmtpCli.MailFrom | MailFrom]] |||| Send SMTP command '''MAIL FROM'''
 
|-
 
| valign="top" | [[TSmtpCli.Open | Open]] |||| Execute methods [[TSmtpCli.Connect | Connect]], [[TSmtpCli.Ehlo | Ehlo]], and [[TSmtpCli.Auth | Auth]] consecutively.
 
|-
 
| valign="top" | [[TSmtpCli.Quit | Quit]] |||| Send SMTP command '''QUIT'''
 
|-
 
| valign="top" | [[TSmtpCli.RcptNameAdd | RcptNameAdd]] |||| Assign recipients to the various recipient lists.
 
|-
 
| valign="top" | [[TSmtpCli.RcptTo | RcptTo]] |||| Send SMTP command '''RCPT TO''', for each recipient in the lists.
 
|-
 
| valign="top" | [[TSmtpCli.Rset | Rset]] |||| Send SMTP command '''RSET'''.
 
|-
 
| valign="top" | [[TSmtpCli.ThreadAttach | ThreadAttach]] |||| Attach the component to current thread context.
 
|-
 
| valign="top" | [[TSmtpCli.ThreadDetach | ThreadDetach]] |||| Detach the component from current thread context.
 
|-
 
| valign="top" | [[TSmtpCli.Vrfy | Vrfy]] |||| Send SMTP command '''VRFY'''.   
 
|}
 
  
 
== Properties ==
 
== Properties ==
Line 66: Line 24:
 
| valign="top" | [[TSmtpCli.ContentType | ContentType]] ||||
 
| valign="top" | [[TSmtpCli.ContentType | ContentType]] ||||
 
|-
 
|-
| valign="top" | [[TSmtpCli.CtrlSocket | CtrlSocket]] ||||
+
| valign="top" | [[TWSocket | CtrlSocket]] |||| TWSocket responcable for the data traffic.
 
|-
 
|-
 
| valign="top" | [[TSmtpCli.EmailFiles | EmailFiles]] ||||
 
| valign="top" | [[TSmtpCli.EmailFiles | EmailFiles]] ||||
Line 119: Line 77:
 
|-
 
|-
 
| valign="top" | [[TSmtpCli.Username | Username]] |||| Align test
 
| valign="top" | [[TSmtpCli.Username | Username]] |||| Align test
 +
|}
 +
 +
== Methods ==
 +
 +
{|
 +
| width="140" valign="top" | [[TSmtpCli.Abort | Abort]] |||| Cancel any transactions in progress, close server connection.
 +
|-
 +
| valign="top" | [[TSmtpCli.Auth | Auth]] |||| Send SMTP command '''AUTH''' starting the authentication process.
 +
|-
 +
| valign="top" | [[TSmtpCli.Connect | Connect]] |||| Connect to the mail server.
 +
|-
 +
| valign="top" | [[TSmtpCli.Create | Create]] |||| Constructor
 +
|-
 +
| valign="top" | [[TSmtpCli.Data | Data]] |||| Send SMTP command '''DATA'''.
 +
|-
 +
| valign="top" | [[TSmtpCli.Destroy | Destroy]] |||| Destructor
 +
|-
 +
| valign="top" | [[TSmtpCli.Ehlo | Ehlo]] |||| Send SMTP command '''EHLO'''.
 +
|-
 +
| valign="top" | [[TSmtpCli.Helo | Helo]] |||| Send SMTP command '''HELO'''.
 +
|-
 +
| valign="top" | [[TSmtpCli.HighLevelAsync | HighLevelAsync]] |||| Execute multiple commands consecutively
 +
|-
 +
| valign="top" | [[TSmtpCli.Mail | Mail]] |||| Execute methods [[TSmtpCli.MailFrom | MailFrom]], [[TSmtpCli.RcptTo | RcptTo]], and [[TSmtpCli.Data | Data]] consecutively.
 +
|-
 +
| valign="top" | [[TSmtpCli.MailFrom | MailFrom]] |||| Send SMTP command '''MAIL FROM'''
 +
|-
 +
| valign="top" | [[TSmtpCli.Open | Open]] |||| Execute methods [[TSmtpCli.Connect | Connect]], [[TSmtpCli.Ehlo | Ehlo]], and [[TSmtpCli.Auth | Auth]] consecutively.
 +
|-
 +
| valign="top" | [[TSmtpCli.Quit | Quit]] |||| Send SMTP command '''QUIT'''
 +
|-
 +
| valign="top" | [[TSmtpCli.RcptNameAdd | RcptNameAdd]] |||| Assign recipients to the various recipient lists.
 +
|-
 +
| valign="top" | [[TSmtpCli.RcptTo | RcptTo]] |||| Send SMTP command '''RCPT TO''', for each recipient in the lists.
 +
|-
 +
| valign="top" | [[TSmtpCli.Rset | Rset]] |||| Send SMTP command '''RSET'''.
 +
|-
 +
| valign="top" | [[TSmtpCli.ThreadAttach | ThreadAttach]] |||| Attach the component to current thread context.
 +
|-
 +
| valign="top" | [[TSmtpCli.ThreadDetach | ThreadDetach]] |||| Detach the component from current thread context.
 +
|-
 +
| valign="top" | [[TSmtpCli.Vrfy | Vrfy]] |||| Send SMTP command '''VRFY'''.   
 
|}
 
|}
  

Revision as of 11:33, 19 February 2006

Overview

  • unit SmtpProt
  • inheritance TCustomSmtpCli->TSmtpCli

Component TSmtpCli implements client-side of the Simple Mail Transfer Protocol as specified in RFC 2821, and MIME message format according to RFC 1521 and 2045. Currently supported SMTP Service Extensions for Authentication are AUTH LOGIN, AUTH PLAIN, AUTH CRAM-MD5 and AUTH CRAM-SHA1 (RFC 2554 as well as RFC 1734). The TSmtpCli is working non-blocking, a synchronously working counterpart is also available, see TSyncSmtpCli.

Properties

AuthType Align test
AuthTypesSupported
CharSet
ConfirmReceipt
Connected
ContentType
CtrlSocket TWSocket responcable for the data traffic.
EmailFiles
ErrorMessage
FromName
Handle
HdrCc
HdrFrom
HdrPriority
HdrReplyTo
HdrReturnPath
HdrSender
HdrSubject
HdrTo
Host
LastResponse
LocalAddr
MailMessage
MessageID
OwnHeaders
Password
Port
RcptName
RequestType
ShareMode
SignOn
State
Username Align test

Methods

Abort Cancel any transactions in progress, close server connection.
Auth Send SMTP command AUTH starting the authentication process.
Connect Connect to the mail server.
Create Constructor
Data Send SMTP command DATA.
Destroy Destructor
Ehlo Send SMTP command EHLO.
Helo Send SMTP command HELO.
HighLevelAsync Execute multiple commands consecutively
Mail Execute methods MailFrom, RcptTo, and Data consecutively.
MailFrom Send SMTP command MAIL FROM
Open Execute methods Connect, Ehlo, and Auth consecutively.
Quit Send SMTP command QUIT
RcptNameAdd Assign recipients to the various recipient lists.
RcptTo Send SMTP command RCPT TO, for each recipient in the lists.
Rset Send SMTP command RSET.
ThreadAttach Attach the component to current thread context.
ThreadDetach Detach the component from current thread context.
Vrfy Send SMTP command VRFY.

Events

OnAfterFileOpen Align test
OnAttachContentType
OnAttachHeader
OnBeforeFileOpen
OnCommand
OnDisplay
OnGetData
OnHeaderLine
OnProcessHeader
OnRcptToError
OnRequestDone
OnResponse
OnSessionClosed
OnSessionConnected

How to

question