Difference between revisions of "TSmtpCli"

From Overbyte
Jump to navigation Jump to search
 
(61 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 +
[[Main_Page | Main page]] -> [[ICS_Components_Reference | ICS component reference]] -> [[TSmtpCli]]
 +
 
== Overview ==
 
== Overview ==
  
* '''unit''' SmtpProt
+
* '''unit''' [[OverbyteIcsSmtpProt.pas | OverbyteIcsSmtpProt.pas]]
* '''inheritance''' TCustomSmtpCli->TSmtpCli
+
* '''inheritance''' TIcsWndControl -> TCustomSmtpClient -> TSmtpCli  
  
 
Component '''TSmtpCli''' implements client-side of the Simple Mail Transfer Protocol as specified in
 
Component '''TSmtpCli''' implements client-side of the Simple Mail Transfer Protocol as specified in
RFC [http://rfc.net/rfc2821.html 2821], and MIME message format according to RFC [http://rfc.net/rfc1521.html 1521] and [http://rfc.net/rfc2045.html 2045]. Currently supported SMTP Service Extensions for Authentication are
+
RFC [http://www.ietf.org/rfc/rfc2821.txt 2821], and MIME message format according to RFC [http://www.ietf.org/rfc/rfc1521.txt 1521] and [http://www.ietf.org/rfc/rfc2045.txt 2045]. Currently supported SMTP Service Extensions for Authentication are
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://www.ietf.org/rfc/rfc2554.txt 2554] as well as RFC [http://www.ietf.org/rfc/rfc1734.txt 1734]).
The TSmtpCli is working '''non-blocking''', a synchronously working counterpart is also available, see [[TSyncSmtpCli | TSyncSmtpCli]].
+
The TSmtpCli methods are [[Asynchronous_Paradigm | '''non-blocking''']], a synchronously working counterpart is also available, see [[TSyncSmtpCli | TSyncSmtpCli]].
  
== Methods ==
+
[[What's_new_in_TSmtpCli_V7 | What's new in TSmtpCli V7?]]
 +
 
 +
== Properties ==
  
{|  
+
{|
| width="140" valign="top" | [[TSmtpCli.Abort | Abort]] |||| Cancel any transactions in progress, close server connection.
+
| valign="top" width="140" | [[TSmtpCli.Allow8BitChars | Allow8BitChars ]] |||| If set to FALSE enables internal encoding of header lines and MailMessage text
|-  
+
|-
| valign="top" | [[TSmtpCli.Auth | Auth]] |||| Send SMTP command '''AUTH''' starting the authentication process.  
+
| valign="top" | [[TSmtpCli.AuthType | AuthType]] |||| Authentication type to be used with method [[TSmtpCli.Auth | '''Auth''']]
 +
|-
 +
| valign="top" | [[TSmtpCli.AuthTypesSupported | AuthTypesSupported]] |||| A list of authentication types supported by the server available after SMTP command [[TSmtpCli.Ehlo | '''EHLO''']] returned
 +
|-
 +
| valign="top" | [[TSmtpCli.CharSet | CharSet]] |||| [http://www.iana.org/assignments/character-sets Character set] of the mail message, default value is the preferred MIME name of current system charset
 +
|-
 +
| valign="top" | [[TSmtpCli.CodePage | CodePage]] |||| The [http://msdn.microsoft.com/en-us/library/dd317756.aspx Windows code page identifier] mapped to value of property [[TSmtpCli.CharSet | CharSet]] (V7)
 +
|-
 +
| valign="top" | [[TSmtpCli.ConfirmReceipt | ConfirmReceipt]] |||| Request confirmation of receipt
 +
|-
 +
| valign="top" | [[TSmtpCli.Connected | Connected]] |||| Are we connected to the mail server? 
 +
|-
 +
| valign="top" | [[TSmtpCli.ContentType | ContentType]] |||| Either HTML or plain text (smtpHtml or smtpPlainText)
 +
|-
 +
| valign="top" | [[TSmtpCli.ConvertToCharset | ConvertToCharset]] |||| Allow charset conversion (ignored by UNICODE compilers, new in V7)
 +
|-
 +
| valign="top" | [[TWSocket | CtrlSocket]] |||| {{CtrlSocket}}
 +
|-
 +
| valign="top" | [[TSmtpCli.DefaultEncoding | DefaultEncoding]] |||| Default Transfer-Encoding
 +
|-
 +
| valign="top" | [[TSmtpCli.EmailFiles | EmailFiles]] |||| List of files to be attached
 +
|-
 +
| valign="top" | [[TSmtpCli.ErrorMessage | ErrorMessage]] |||| Last SMTP error message
 +
|-
 +
| valign="top" | [[TSmtpCli.FoldHeaders | FoldHeaders]] |||| Fold header lines if their length exceed the limit   
 
|-
 
|-
| valign="top" | [[TSmtpCli.Connect | Connect]] |||| Connect to the mail server.
+
| valign="top" | [[TSmtpCli.FromName | FromName]] |||| E-mail address sent to the mail server with SMTP command [[TSmtpCli.MailTo | '''MAIL''']]
 
|-
 
|-
| valign="top" | [[TSmtpCli.Create | Create]] |||| Constructor
+
| valign="top" | [[TSmtpCli.Handle | Handle]] |||| Handle of the hidden window used internally by the component
 
|-
 
|-
| valign="top" | [[TSmtpCli.Data | Data]] |||| Send SMTP command '''DATA'''.
+
| valign="top" | [[TSmtpCli.HdrCc | HdrCc]] |||| Value of mail header line '''CC'''
 
|-
 
|-
| valign="top" | [[TSmtpCli.Destroy | Destroy]] |||| Destructor
+
| valign="top" | [[TSmtpCli.HdrFrom | HdrFrom]] |||| Value of mail header line '''From'''
 
|-
 
|-
| valign="top" | [[TSmtpCli.Ehlo | Ehlo]] |||| Send SMTP command '''EHLO'''.
+
| valign="top" | [[TSmtpCli.HdrPriority | HdrPriority]] |||| Mail priority (creates a custom mail header line).
 
|-
 
|-
| valign="top" | [[TSmtpCli.Helo | Helo]] |||| Send SMTP command '''HELO'''.
+
| valign="top" | [[TSmtpCli.HdrReplyTo | HdrReplyTo]] |||| Value of mail header line '''Reply-To'''
 
|-
 
|-
| valign="top" | [[TSmtpCli.HighLevelAsync | HighLevelAsync]] |||| Execute multiple commands in a chain
+
| valign="top" | [[TSmtpCli.HdrReturnPath | HdrReturnPath]] |||| Value of mail header line '''Return-Path'''
 
|-
 
|-
| valign="top" | [[TSmtpCli.Mail | Mail]] |||| Execute methods [[TSmtpCli.MailFrom | MailFrom]], [[TSmtpCli.RcptTo | RcptTo]], and [[TSmtpCli.Data | Data]] in a chain.
+
| valign="top" | [[TSmtpCli.HdrSender | HdrSender]] |||| Value of mail header line '''Sender'''
 
|-
 
|-
| valign="top" | [[TSmtpCli.MailFrom | MailFrom]] |||| Send SMTP command '''MAIL FROM'''
+
| valign="top" | [[TSmtpCli.HdrSubject | HdrSubject]] |||| Value of mail header line '''Subject'''
 
|-
 
|-
| valign="top" | [[TSmtpCli.Open | Open]] |||| Execute methods [[TSmtpCli.Connect | Connect]], [[TSmtpCli.Ehlo | Ehlo]], and [[TSmtpCli.Auth | Auth]] in a chain.
+
| valign="top" | [[TSmtpCli.HdrTo | HdrTo]] |||| Value of mail header line '''To'''
 
|-
 
|-
| valign="top" | [[TSmtpCli.Quit | Quit]] |||| Send SMTP command '''QUIT'''
+
| valign="top" | [[TSmtpCli.Host | Host]] |||| Host name or IP address of the SMTP server
 
|-
 
|-
| valign="top" | [[TSmtpCli.RcptNameAdd | RcptNameAdd]] |||| Assign recipients to the various recipient lists.
+
| valign="top" | [[TSmtpCli.LastResponse | LastResponse]] |||| Last response from the mail server.
 
|-
 
|-
| valign="top" | [[TSmtpCli.RcptTo | RcptTo]] |||| Send SMTP command '''RCPT TO''', for each recipient in the lists.
+
| valign="top" | [[TSmtpCli.LocalAddr | LocalAddr]] |||| Interface to be bound to the socket, defaults to "0.0.0.0" = any interface
 
|-
 
|-
| valign="top" | [[TSmtpCli.Rset | Rset]] |||| Send SMTP command '''RSET'''.
+
| valign="top" | [[TSmtpCli.MailMessage | MailMessage]] |||| The mail message text.  
 
|-
 
|-
| valign="top" | [[TSmtpCli.ThreadAttach | ThreadAttach]] |||| Attach the component to current thread context.
+
| valign="top" | [[TSmtpCli.MaxMessageSize | MaxMessageSize]] |||| Indicates the maximum message size accepted by the server (V7)
 
|-
 
|-
| valign="top" | [[TSmtpCli.ThreadDetach | ThreadDetach]] |||| Detach the component from current thread context.
+
| valign="top" | [[TSmtpCli.MessageID | MessageID]] |||| A unique ID created for each mail message, appears as mail header line (Message-ID)
 
|-
 
|-
| valign="top" | [[TSmtpCli.Vrfy | Vrfy]] |||| Send SMTP command '''VRFY'''.   
+
| valign="top" | [[TSmtpCli.MessageSize | MessageSize]] |||| Size of the e-mail (V7)
|}
 
 
 
== Properties ==
 
 
 
{|
 
| valign="top" width="140" | [[TSmtpCli.AuthType | AuthType]] |||| Align test
 
 
|-
 
|-
| valign="top" | [[TSmtpCli.AuthTypesSupported | AuthTypesSupported]] ||||
+
| valign="top" | [[TSmtpCli.OwnHeaders | OwnHeaders]] |||| Set OwnHeaders to True in order to send your own, custom header lines.
 
|-
 
|-
| valign="top" | [[TSmtpCli.CharSet | CharSet]] ||||
+
| valign="top" | [[TSmtpCli.Password | Password]] |||| SMTP login password
 
|-
 
|-
| valign="top" | [[TSmtpCli.ConfirmReceipt | ConfirmReceipt]] ||||
+
| valign="top" | [[TSmtpCli.Port | Port]] |||| Port number of the SMTP server, defaults to 25
 
|-
 
|-
| valign="top" | [[TSmtpCli.Connected | Connected]] ||||
+
| valign="top" | [[TSmtpCli.RcptName | RcptName]] |||| E-mail address to be sent to the mail server with SMTP command [[TSmtpCli.RcptTo | '''RCPT''']]
 
|-
 
|-
| valign="top" | [[TSmtpCli.ContentType | ContentType]] ||||
+
| valign="top" | [[TSmtpCli.RequestType | RequestType]] |||| Current request type
 
|-
 
|-
| valign="top" | [[TSmtpCli.CtrlSocket | CtrlSocket]] ||||
+
| valign="top" | [[TSmtpCli.ShareMode | ShareMode]] |||| ShareMode of the stream (file attachments).
 
|-
 
|-
| valign="top" | [[TSmtpCli.EmailFiles | EmailFiles]] ||||
+
| valign="top" | [[TSmtpCli.SignOn | SignOn]] |||| Parameter sent with the SMTP commands [[TSmtpCli.Helo | '''HELO''']] and [[TSmtpCli.Ehlo | '''EHLO''']]
 
|-
 
|-
| valign="top" | [[TSmtpCli.ErrorMessage | ErrorMessage]] ||||
+
| valign="top" | [[TSmtpCli.SizeSupported | SizeSupported]] |||| Indicates whether the server supports the RFC-1870 SIZE extension (V7) 
 
|-
 
|-
| valign="top" | [[TSmtpCli.FromName | FromName]] ||||
+
| valign="top" | [[TSmtpCli.State | State]] |||| Current component state
 
|-
 
|-
| valign="top" | [[TSmtpCli.Handle | Handle]] ||||
+
| valign="top" | [[TSmtpCli.Username | Username]] |||| SMTP login username
 
|-
 
|-
| valign="top" | [[TSmtpCli.HdrCc | HdrCc]] ||||
+
| valign="top" | [[TSmtpCli.WrapMessageText | WrapMessageText]] |||| Tries to insert line breaks in unencoded [[TSmtpCli.MailMessage | MailMessage]] text if line length exceed value of property WrapMsgMaxLineLen
 
|-
 
|-
| valign="top" | [[TSmtpCli.HdrFrom | HdrFrom]] ||||
+
| valign="top" | [[TSmtpCli.WrapMsgMaxLineLen | WrapMsgMaxLineLen]] |||| MailMessage maximum line length (V7)
 +
|}
 +
 
 +
== Methods ==
 +
 
 +
{|
 +
| width="140" valign="top" | [[TSmtpCli.Abort | Abort]] |||| Cancels any transactions in progress, closes server connection.
 +
|-
 +
| valign="top" | [[TSmtpCli.Auth | Auth]] |||| Sends SMTP command '''AUTH''' starting the authentication process.
 
|-
 
|-
| valign="top" | [[TSmtpCli.HdrPriority | HdrPriority]] ||||
+
| valign="top" | [[TSmtpCli.CalcMsgSize | CalcMsgSize]] |||| Calculates message size (V7)
 
|-
 
|-
| valign="top" | [[TSmtpCli.HdrReplyTo | HdrReplyTo]] ||||
+
| valign="top" | [[TSmtpCli.CalcMsgSizeSync | CalcMsgSizeSync]] |||| Calculates message size synchronously (V7)
 
|-
 
|-
| valign="top" | [[TSmtpCli.HdrReturnPath | HdrReturnPath]] ||||
+
| valign="top" | [[TSmtpCli.Connect | Connect]] |||| Connects to the mail server.
 
|-
 
|-
| valign="top" | [[TSmtpCli.HdrSender | HdrSender]] ||||
+
| valign="top" | [[TSmtpCli.Create | Create]] |||| Constructor
 
|-
 
|-
| valign="top" | [[TSmtpCli.HdrSubject | HdrSubject]] ||||
+
| valign="top" | [[TSmtpCli.Data | Data]] |||| Sends SMTP command '''DATA'''.
 
|-
 
|-
| valign="top" | [[TSmtpCli.HdrTo | HdrTo]] ||||
+
| valign="top" | [[TSmtpCli.Destroy | Destroy]] |||| Destructor
 
|-
 
|-
| valign="top" | [[TSmtpCli.Host | Host]] ||||
+
| valign="top" | [[TSmtpCli.Ehlo | Ehlo]] |||| Sends SMTP command '''EHLO'''.
 
|-
 
|-
| valign="top" | [[TSmtpCli.LastResponse | LastResponse]] ||||
+
| valign="top" | [[TSmtpCli.Helo | Helo]] |||| Sends SMTP command '''HELO'''.
 
|-
 
|-
| valign="top" | [[TSmtpCli.LocalAddr | LocalAddr]] ||||
+
| valign="top" | [[TSmtpCli.HighLevelAsync | HighLevelAsync]] |||| Execute multiple commands consecutively
 
|-
 
|-
| valign="top" | [[TSmtpCli.MailMessage | MailMessage]] ||||
+
| valign="top" | [[TSmtpCli.Mail | Mail]] |||| Executes methods [[TSmtpCli.MailFrom | MailFrom]], [[TSmtpCli.RcptTo | RcptTo]], and [[TSmtpCli.Data | Data]] consecutively.
 
|-
 
|-
| valign="top" | [[TSmtpCli.MessageID | MessageID]] ||||
+
| valign="top" | [[TSmtpCli.MailFrom | MailFrom]] |||| Sends SMTP command '''MAIL'''
 
|-
 
|-
| valign="top" | [[TSmtpCli.OwnHeaders | OwnHeaders]] ||||
+
| valign="top" | [[TSmtpCli.MailFromSIZE | MailFromSIZE]] |||| Same as  [[TSmtpCli.MailFrom | MailFrom]] however appends the message size as argument (V7)
 
|-
 
|-
| valign="top" | [[TSmtpCli.Password | Password]] ||||
+
| valign="top" | [[TSmtpCli.Open | Open]] |||| Executes methods [[TSmtpCli.Connect | Connect]], [[TSmtpCli.Ehlo | Ehlo]], and [[TSmtpCli.Auth | Auth]] consecutively.
 
|-
 
|-
| valign="top" | [[TSmtpCli.Port | Port]] ||||
+
| valign="top" | [[TSmtpCli.Quit | Quit]] |||| Sends SMTP command '''QUIT'''
 
|-
 
|-
| valign="top" | [[TSmtpCli.RcptName | RcptName]] ||||
+
| valign="top" | [[TSmtpCli.RcptNameAdd | RcptNameAdd]] |||| Assigns recipients to the various recipient lists.
 
|-
 
|-
| valign="top" | [[TSmtpCli.RequestType | RequestType]] ||||
+
| valign="top" | [[TSmtpCli.RcptTo | RcptTo]] |||| Sends SMTP command '''RCPT''', for each recipient in the lists.
 
|-
 
|-
| valign="top" | [[TSmtpCli.ShareMode | ShareMode]] ||||
+
| valign="top" | [[TSmtpCli.Rset | Rset]] |||| Sends SMTP command '''RSET'''.
 
|-
 
|-
| valign="top" | [[TSmtpCli.SignOn | SignOn]] ||||
+
| valign="top" | [[TSmtpCli.ThreadAttach | ThreadAttach]] |||| Attaches the component to current thread context.
 
|-
 
|-
| valign="top" | [[TSmtpCli.State | State]] ||||
+
| valign="top" | [[TSmtpCli.ThreadDetach | ThreadDetach]] |||| Detaches the component from current thread context.
 
|-
 
|-
| valign="top" | [[TSmtpCli.Username | Username]] |||| Align test
+
| valign="top" | [[TSmtpCli.Vrfy | Vrfy]] |||| Sends SMTP command '''VRFY'''.   
 
|}
 
|}
  
Line 124: Line 154:
  
 
{|
 
{|
| valign="top" width="140" | [[TSmtpCli.OnAfterFileOpen | OnAfterFileOpen]] |||| Align test
+
| valign="top" width="140" | [[TSmtpCli.OnAfterFileOpen | OnAfterFileOpen]] |||| Triggered after the attempt to open a file to be attached.
 +
|-
 +
| valign="top" | [[TSmtpCli.OnAttachContentType | OnAttachContentType]] |||| Triggered before the content-type header line of an attachment part header is formed.
 
|-
 
|-
| valign="top" | [[TSmtpCli.OnAttachContentType | OnAttachContentType]] ||||
+
| valign="top" | [[TSmtpCli.OnAttachHeader | OnAttachHeader]] |||| Triggered after all header lines of an attachment part header have been formed. 
 
|-
 
|-
| valign="top" | [[TSmtpCli.OnAttachHeader | OnAttachHeader]] ||||
+
| valign="top" | [[TSmtpCli.OnBeforeFileOpen | OnBeforeFileOpen]] |||| Triggered before the attempt to open a file to be attached.
 
|-
 
|-
| valign="top" | [[TSmtpCli.OnBeforeFileOpen | OnBeforeFileOpen]] ||||
+
| valign="top" | [[TSmtpCli.OnCommand | OnCommand]] |||| Triggered on every command that is sent.
 
|-
 
|-
| valign="top" | [[TSmtpCli.OnCommand | OnCommand]] ||||
+
| valign="top" | [[TSmtpCli.OnDisplay | OnDisplay]] |||| Triggered on every command/response. Useful for debugging purposes.
 
|-
 
|-
| valign="top" | [[TSmtpCli.OnDisplay | OnDisplay]] ||||
+
| valign="top" | [[TSmtpCli.OnGetData | OnGetData]] |||| Triggered when the component requests next data line, useful for sending custom data.
 
|-
 
|-
| valign="top" | [[TSmtpCli.OnGetData | OnGetData]] ||||
+
| valign="top" | [[TSmtpCli.OnHeaderLine | OnHeaderLine]] |||| Triggered on each mail header line.
 
|-
 
|-
| valign="top" | [[TSmtpCli.OnHeaderLine | OnHeaderLine]] ||||
+
| valign="top" | [[TSmtpCli.OnMessageDataSent | OnMessageDataSent]] |||| Triggered whenever message data have been sent (V7).
 
|-
 
|-
| valign="top" | [[TSmtpCli.OnProcessHeader | OnProcessHeader]] ||||
+
| valign="top" | [[TSmtpCli.OnProcessHeader | OnProcessHeader]] |||| Triggered before the mail header lines are formed.
 
|-
 
|-
| valign="top" | [[TSmtpCli.OnRcptToError | OnRcptToError]] ||||
+
| valign="top" | [[TSmtpCli.OnRcptToError | OnRcptToError]] |||| Triggered when one of the recipients are i.e. rejected by server for some reason.
 
|-
 
|-
| valign="top" | [[TSmtpCli.OnRequestDone | OnRequestDone]] ||||
+
| valign="top" | [[TSmtpCli.OnRequestDone | OnRequestDone]] |||| Triggered when a request is completed.
 
|-
 
|-
| valign="top" | [[TSmtpCli.OnResponse | OnResponse]] ||||
+
| valign="top" | [[TSmtpCli.OnResponse | OnResponse]] |||| Triggered on server's response.
 
|-
 
|-
| valign="top" | [[TSmtpCli.OnSessionClosed | OnSessionClosed]] ||||
+
| valign="top" | [[TSmtpCli.OnSessionClosed | OnSessionClosed]] |||| Triggered when the connection has been closed.
 
|-
 
|-
| valign="top" | [[TSmtpCli.OnSessionConnected | OnSessionConnected]] ||||
+
| valign="top" | [[TSmtpCli.OnSessionConnected | OnSessionConnected]] |||| Triggered when a connection has been established.
 
|}
 
|}
  
Line 156: Line 188:
  
 
[[TSmtpCli.FAQ.question | question]]
 
[[TSmtpCli.FAQ.question | question]]
 +
 +
== See also ==
 +
*[[What's_new_in_TSmtpCli_V7 | What's new in TSmtpCli V7]]
 +
 +
{{Components_Footer}}

Latest revision as of 20:12, 17 January 2016

Main page -> ICS component reference -> TSmtpCli

Overview

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 methods are non-blocking, a synchronously working counterpart is also available, see TSyncSmtpCli.

What's new in TSmtpCli V7?

Properties

Allow8BitChars If set to FALSE enables internal encoding of header lines and MailMessage text
AuthType Authentication type to be used with method Auth
AuthTypesSupported A list of authentication types supported by the server available after SMTP command EHLO returned
CharSet Character set of the mail message, default value is the preferred MIME name of current system charset
CodePage The Windows code page identifier mapped to value of property CharSet (V7)
ConfirmReceipt Request confirmation of receipt
Connected Are we connected to the mail server?
ContentType Either HTML or plain text (smtpHtml or smtpPlainText)
ConvertToCharset Allow charset conversion (ignored by UNICODE compilers, new in V7)
CtrlSocket The underlying instance of TWSocket handles the connection and raw data exchange.
DefaultEncoding Default Transfer-Encoding
EmailFiles List of files to be attached
ErrorMessage Last SMTP error message
FoldHeaders Fold header lines if their length exceed the limit
FromName E-mail address sent to the mail server with SMTP command MAIL
Handle Handle of the hidden window used internally by the component
HdrCc Value of mail header line CC
HdrFrom Value of mail header line From
HdrPriority Mail priority (creates a custom mail header line).
HdrReplyTo Value of mail header line Reply-To
HdrReturnPath Value of mail header line Return-Path
HdrSender Value of mail header line Sender
HdrSubject Value of mail header line Subject
HdrTo Value of mail header line To
Host Host name or IP address of the SMTP server
LastResponse Last response from the mail server.
LocalAddr Interface to be bound to the socket, defaults to "0.0.0.0" = any interface
MailMessage The mail message text.
MaxMessageSize Indicates the maximum message size accepted by the server (V7)
MessageID A unique ID created for each mail message, appears as mail header line (Message-ID)
MessageSize Size of the e-mail (V7)
OwnHeaders Set OwnHeaders to True in order to send your own, custom header lines.
Password SMTP login password
Port Port number of the SMTP server, defaults to 25
RcptName E-mail address to be sent to the mail server with SMTP command RCPT
RequestType Current request type
ShareMode ShareMode of the stream (file attachments).
SignOn Parameter sent with the SMTP commands HELO and EHLO
SizeSupported Indicates whether the server supports the RFC-1870 SIZE extension (V7)
State Current component state
Username SMTP login username
WrapMessageText Tries to insert line breaks in unencoded MailMessage text if line length exceed value of property WrapMsgMaxLineLen
WrapMsgMaxLineLen MailMessage maximum line length (V7)

Methods

Abort Cancels any transactions in progress, closes server connection.
Auth Sends SMTP command AUTH starting the authentication process.
CalcMsgSize Calculates message size (V7)
CalcMsgSizeSync Calculates message size synchronously (V7)
Connect Connects to the mail server.
Create Constructor
Data Sends SMTP command DATA.
Destroy Destructor
Ehlo Sends SMTP command EHLO.
Helo Sends SMTP command HELO.
HighLevelAsync Execute multiple commands consecutively
Mail Executes methods MailFrom, RcptTo, and Data consecutively.
MailFrom Sends SMTP command MAIL
MailFromSIZE Same as MailFrom however appends the message size as argument (V7)
Open Executes methods Connect, Ehlo, and Auth consecutively.
Quit Sends SMTP command QUIT
RcptNameAdd Assigns recipients to the various recipient lists.
RcptTo Sends SMTP command RCPT, for each recipient in the lists.
Rset Sends SMTP command RSET.
ThreadAttach Attaches the component to current thread context.
ThreadDetach Detaches the component from current thread context.
Vrfy Sends SMTP command VRFY.

Events

OnAfterFileOpen Triggered after the attempt to open a file to be attached.
OnAttachContentType Triggered before the content-type header line of an attachment part header is formed.
OnAttachHeader Triggered after all header lines of an attachment part header have been formed.
OnBeforeFileOpen Triggered before the attempt to open a file to be attached.
OnCommand Triggered on every command that is sent.
OnDisplay Triggered on every command/response. Useful for debugging purposes.
OnGetData Triggered when the component requests next data line, useful for sending custom data.
OnHeaderLine Triggered on each mail header line.
OnMessageDataSent Triggered whenever message data have been sent (V7).
OnProcessHeader Triggered before the mail header lines are formed.
OnRcptToError Triggered when one of the recipients are i.e. rejected by server for some reason.
OnRequestDone Triggered when a request is completed.
OnResponse Triggered on server's response.
OnSessionClosed Triggered when the connection has been closed.
OnSessionConnected Triggered when a connection has been established.

How to

question

See also



ICS Components Reference