![]() |
![]() ![]() ![]() |
SendMail
|
function SendMail(const FromAddr, FromName, ToAddr, ToName, Subject, Body: String;
|
const SMTPHost: String = 'localhost'; SMTPPort: Word = 25;
|
ContentType: TSMTPContentType = ctHTML; Priority: TSMTPPriority = mpNormal;
|
const ContentCharset: String = 'iso-8859-1'; RunInSeparateThread: Boolean = True): Boolean;
|
The QuickSendMail function is alternative way to send email messages without having the SendMail component on the form, and without dynamic creation of SendMail component instances. When you use this function everything created/released internally.
|
|
The QuickSendMail have following set of parameters (some of parameters are optional and may be not specified):
|
Parameter | Meaning
|
FromAddr | specifies the email address of sender;
|
FromName | specifies the name of sender (the name which displayed in email message, can be empty string);
|
ToAddr | email address of recipient;
|
ToName | name of recipient (can be empty string);
|
Subject | the subject of email message;
|
Body | the text of email message (can contain HTML tags if ContentType is ctHTML, or just plain text if ContentType is ctPlainText);
|
SMTPHost | the hostname or IP address of SMTP server;
|
SMTPPort | the port number of SMTP server (standard port for SMTP servers is 25);
|
ContentType | can be ctPlainText if your email message contains just plain text, or ctHTML if it should be HTML-formatted;
|
Priority | priority of email message (npNormal by default);
|
ContentCharset | the set of characters of text in email message. Use appropriate definition of charset for language used in email message;
|
RunInSeparateThread | specifies whether the message should be prepared and sent via Internet to SMTP server in current, caller's thread, or should create separate thread which will process the message delivery. Set this parameter to True to create separate thread, or to False if the part of code which calls the QuickSendMail function are already in separate, non-interface thread.
|
SendMail component.
|