Difference between revisions of "TSmtpCli"
Jump to navigation
Jump to search
Line 23: | Line 23: | ||
|- | |- | ||
| valign="top" | [[TSmtpCli.CharSet | CharSet]] |||| The character set of the mail message, default value is the preferred MIME charset name of current system charset | | valign="top" | [[TSmtpCli.CharSet | CharSet]] |||| The character set of the mail message, default value is the preferred MIME charset 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 the value of property [[TSmtpCli.CharSet | '''CharSet''']] | ||
|- | |- | ||
| valign="top" | [[TSmtpCli.ConfirmReceipt | ConfirmReceipt]] |||| Request confirmation of receipt | | valign="top" | [[TSmtpCli.ConfirmReceipt | ConfirmReceipt]] |||| Request confirmation of receipt |
Revision as of 11:33, 29 May 2009
Main page -> ICS component reference -> TSmtpCli
Overview
- unit (OverbyteIcs)SmtpProt.pas
- 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 methods are non-blocking, a synchronously working counterpart is also available, see TSyncSmtpCli.
Properties
Allow8BitChars | If set to FALSE enables internal encoding of header lines and MailMessage text | |
AuthType | Authentication method to be used with method Auth | |
AuthTypesSupported | A list of authentication methods supported by the server available after SMTP command EHLO returned | |
CharSet | The character set of the mail message, default value is the preferred MIME charset name of current system charset | |
CodePage | The Windows code page identifier mapped to the value of property CharSet | |
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 | File attachments | |
ErrorMessage | Last SMTP error message | |
FoldHeaders | Fold header lines if they exceed the limit | |
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 | 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 | ||
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 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 | |
State | Current component state | |
Username | SMTP login username | |
WrapMessageText | Tries to insert line breaks in unencoded MailMessage text if lines exceed value of property WrapMsgMaxLineLen | |
WrapMsgMaxLineLen | MailMessage maximum line length |
Methods
Abort | Cancels any transactions in progress, closes 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 | |
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. | |
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
See also