Difference between revisions of "TSmtpCli"
Jump to navigation
Jump to search
Line 14: | Line 14: | ||
{| | {| | ||
− | | valign="top" width="140" | [[TSmtpCli.AuthType | AuthType]] |||| | + | | valign="top" width="140" | [[TSmtpCli.AuthType | AuthType]] |||| Authentication methode to be used with method [[TSmtpCli.Auth | '''Auth''']]. |
|- | |- | ||
− | | valign="top" | [[TSmtpCli.AuthTypesSupported | AuthTypesSupported]] |||| | + | | valign="top" | [[TSmtpCli.AuthTypesSupported | AuthTypesSupported]] |||| A list of authentication methods supported by the server available after command '''EHLO''' returned. |
|- | |- | ||
− | | valign="top" | [[TSmtpCli.CharSet | CharSet]] |||| | + | | valign="top" | [[TSmtpCli.CharSet | CharSet]] |||| The Character set, default value iso-8859-1 |
|- | |- | ||
− | | valign="top" | [[TSmtpCli.ConfirmReceipt | ConfirmReceipt]] |||| | + | | valign="top" | [[TSmtpCli.ConfirmReceipt | ConfirmReceipt]] |||| Request confirmation of receipt. |
|- | |- | ||
− | | valign="top" | [[TSmtpCli.Connected | Connected]] |||| | + | | valign="top" | [[TSmtpCli.Connected | Connected]] |||| Are we connected to the mail server? |
|- | |- | ||
− | | valign="top" | [[TSmtpCli.ContentType | ContentType]] |||| | + | | valign="top" | [[TSmtpCli.ContentType | ContentType]] |||| Either HTML or plain text (smtpHtml or smtpPlainText) |
|- | |- | ||
| valign="top" | [[TWSocket | CtrlSocket]] |||| {{CtrlSocket}} | | valign="top" | [[TWSocket | CtrlSocket]] |||| {{CtrlSocket}} | ||
|- | |- | ||
− | | valign="top" | [[TSmtpCli.EmailFiles | EmailFiles]] |||| | + | | valign="top" | [[TSmtpCli.EmailFiles | EmailFiles]] |||| File attachments. |
|- | |- | ||
− | | valign="top" | [[TSmtpCli.ErrorMessage | ErrorMessage]] |||| | + | | valign="top" | [[TSmtpCli.ErrorMessage | ErrorMessage]] |||| Last SMTP error message. |
|- | |- | ||
− | | valign="top" | [[TSmtpCli.FromName | FromName]] |||| | + | | valign="top" | [[TSmtpCli.FromName | FromName]] |||| E-mail address to be sent to the mail server with SMTP command '''MAIL'''. |
|- | |- | ||
− | | valign="top" | [[TSmtpCli.Handle | Handle]] |||| | + | | valign="top" | [[TSmtpCli.Handle | Handle]] |||| Handle of the hidden window used internally by the component. |
|- | |- | ||
− | | valign="top" | [[TSmtpCli.HdrCc | HdrCc]] |||| | + | | valign="top" | [[TSmtpCli.HdrCc | HdrCc]] |||| Mail header line '''CC'''. |
|- | |- | ||
− | | valign="top" | [[TSmtpCli.HdrFrom | HdrFrom]] |||| | + | | valign="top" | [[TSmtpCli.HdrFrom | HdrFrom]] |||| Mail header line '''From'''. |
|- | |- | ||
− | | valign="top" | [[TSmtpCli.HdrPriority | HdrPriority]] |||| | + | | valign="top" | [[TSmtpCli.HdrPriority | HdrPriority]] |||| Mail priority (creates a custom mail header line). |
|- | |- | ||
− | | valign="top" | [[TSmtpCli.HdrReplyTo | HdrReplyTo]] |||| | + | | valign="top" | [[TSmtpCli.HdrReplyTo | HdrReplyTo]] |||| Mail header line '''Reply-To'''. |
|- | |- | ||
− | | valign="top" | [[TSmtpCli.HdrReturnPath | HdrReturnPath]] |||| | + | | valign="top" | [[TSmtpCli.HdrReturnPath | HdrReturnPath]] |||| Mail header line '''Return-Path''' |
|- | |- | ||
− | | valign="top" | [[TSmtpCli.HdrSender | HdrSender]] |||| | + | | valign="top" | [[TSmtpCli.HdrSender | HdrSender]] |||| Mail header line '''Sender'''. |
|- | |- | ||
− | | valign="top" | [[TSmtpCli.HdrSubject | HdrSubject]] |||| | + | | valign="top" | [[TSmtpCli.HdrSubject | HdrSubject]] |||| Mail header line '''Subject''' |
|- | |- | ||
− | | valign="top" | [[TSmtpCli.HdrTo | HdrTo]] |||| | + | | valign="top" | [[TSmtpCli.HdrTo | HdrTo]] |||| Mail header line '''To''' |
|- | |- | ||
− | | valign="top" | [[TSmtpCli.Host | Host]] |||| | + | | valign="top" | [[TSmtpCli.Host | Host]] |||| Host name or IP Address of the SMTP server |
|- | |- | ||
− | | valign="top" | [[TSmtpCli.LastResponse | LastResponse]] |||| | + | | valign="top" | [[TSmtpCli.LastResponse | LastResponse]] |||| Last response from the mail server. |
|- | |- | ||
− | | valign="top" | [[TSmtpCli.LocalAddr | LocalAddr]] |||| | + | | valign="top" | [[TSmtpCli.LocalAddr | LocalAddr]] |||| |
|- | |- | ||
− | | valign="top" | [[TSmtpCli.MailMessage | MailMessage]] |||| | + | | valign="top" | [[TSmtpCli.MailMessage | MailMessage]] |||| The mail message. |
|- | |- | ||
− | | valign="top" | [[TSmtpCli.MessageID | MessageID]] |||| | + | | valign="top" | [[TSmtpCli.MessageID | MessageID]] |||| A unique ID created for each mail message, appears as mail header line (Message-ID) |
|- | |- | ||
− | | valign="top" | [[TSmtpCli.OwnHeaders | OwnHeaders]] |||| | + | | valign="top" | [[TSmtpCli.OwnHeaders | OwnHeaders]] |||| Set OwnHeaders to True in order to build your own, custom headers. |
|- | |- | ||
− | | valign="top" | [[TSmtpCli.Password | Password]] |||| | + | | valign="top" | [[TSmtpCli.Password | Password]] |||| SMTP login password |
|- | |- | ||
− | | valign="top" | [[TSmtpCli.Port | Port]] |||| | + | | valign="top" | [[TSmtpCli.Port | Port]] |||| Port number of the SMTP server, defaults to 25 |
|- | |- | ||
− | | valign="top" | [[TSmtpCli.RcptName | RcptName]] |||| | + | | valign="top" | [[TSmtpCli.RcptName | RcptName]] |||| E-mail address to be sent to the mail server with SMTP command '''RCPT''' |
|- | |- | ||
− | | valign="top" | [[TSmtpCli.RequestType | RequestType]] |||| | + | | valign="top" | [[TSmtpCli.RequestType | RequestType]] |||| Current request type |
|- | |- | ||
− | | valign="top" | [[TSmtpCli.ShareMode | ShareMode]] |||| | + | | valign="top" | [[TSmtpCli.ShareMode | ShareMode]] |||| ShareMode of the stream (file attachments). |
|- | |- | ||
− | | valign="top" | [[TSmtpCli.SignOn | SignOn]] |||| | + | | valign="top" | [[TSmtpCli.SignOn | SignOn]] |||| Parameter sent with the '''HELO/EHLO''' command to the mail server. |
|- | |- | ||
− | | valign="top" | [[TSmtpCli.State | State]] |||| | + | | valign="top" | [[TSmtpCli.State | State]] |||| Current component state |
|- | |- | ||
− | | valign="top" | [[TSmtpCli.Username | Username]] |||| | + | | valign="top" | [[TSmtpCli.Username | Username]] |||| SMTP login username |
|} | |} | ||
Revision as of 16:06, 27 September 2007
Main page -> ICS component reference -> TSmtpCli
Contents
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 | Authentication methode to be used with method Auth. | |
AuthTypesSupported | A list of authentication methods supported by the server available after command EHLO returned. | |
CharSet | The Character set, default value iso-8859-1 | |
ConfirmReceipt | Request confirmation of receipt. | |
Connected | Are we connected to the mail server? | |
ContentType | Either HTML or plain text (smtpHtml or smtpPlainText) | |
CtrlSocket | The underlying instance of TWSocket handles the connection and raw data exchange. | |
EmailFiles | File attachments. | |
ErrorMessage | Last SMTP error message. | |
FromName | E-mail address to be sent to the mail server with SMTP command MAIL. | |
Handle | Handle of the hidden window used internally by the component. | |
HdrCc | Mail header line CC. | |
HdrFrom | Mail header line From. | |
HdrPriority | Mail priority (creates a custom mail header line). | |
HdrReplyTo | Mail header line Reply-To. | |
HdrReturnPath | Mail header line Return-Path | |
HdrSender | Mail header line Sender. | |
HdrSubject | Mail header line Subject | |
HdrTo | Mail header line To | |
Host | Host name or IP Address of the SMTP server | |
LastResponse | Last response from the mail server. | |
LocalAddr | ||
MailMessage | The mail message. | |
MessageID | A unique ID created for each mail message, appears as mail header line (Message-ID) | |
OwnHeaders | Set OwnHeaders to True in order to build your own, custom headers. | |
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 HELO/EHLO command to the mail server. | |
State | Current component state | |
Username | SMTP login username |
Methods
Abort | Cancels any transactions in progress, close server connection. | |
Auth | Sends SMTP command AUTH starting the authentication process. | |
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 | |
Executes methods MailFrom, RcptTo, and Data consecutively. | ||
MailFrom | Sends SMTP command MAIL FROM | |
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 TO, 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 | Align test | |
OnAttachContentType | ||
OnAttachHeader | ||
OnBeforeFileOpen | ||
OnCommand | ||
OnDisplay | Triggered for every command/response. Is very useful to output for debug-purposes. | |
OnGetData | ||
OnHeaderLine | ||
OnProcessHeader | ||
OnRcptToError | ||
OnRequestDone | Triggered when a request is completed. | |
OnResponse | ||
OnSessionClosed | ||
OnSessionConnected |
How to