<< Click to Display Table of Contents >> Navigation: Reference > SmtpMail > Overview |
SmtpMail object is used to send messages, obtain status of messages, cancel delivery of messages and set SMTP server parameters. SmtpMail object should remain in memory until all messages are either delivered, canceled or failed. An application can create more than one instance of SmtpMail object if it needs to.
Syntax:
[Visual Basic]
Dim objSmtpMail As New AddEmailLib.SmtpMail
objSmtpMail.SmtpServer = "mail.myisp.com"
[VBScript]
Dim objSmtpMail
Set objSmtpMail = CreateObject("AddEmail.SmtpMail")
objSmtpMail.SmtpServer = "mail.myisp.com"
[C#]
AddEmailLib.SmtpMailClass objSmtpMail = new AddEmailLib.SmtpMailClass();
objSmtpMail.SmtpServer = "mail.myisp.com";
[C++]
AddEmailLib::ISmtpMailPtr spSmtpMail;
spSmtpMail.CreateInstance(__uuidof(AddEmailLib::SmtpMail));
spSmtpMail->PutSmtpServer("mail.myisp.com");
Properties:
Name or IP address of the SMTP server to use for sending e-mail messages. |
|
Port number on the SMTP server. |
|
User name (account name) on the SMTP server. |
|
Password on the SMTP server. |
|
Specifies whether SMTP server requires an encrypted connection (TLS/SSL). |
|
Specifies whether to use Secure Password Authentication (SPA). |
|
Maximum number of mail sending threads. |
|
Serial number to activate purchased copy of AddEmail. |
|
Fully-qualified hostname of the computer that sends the e-mails. |
|
Number of connect attempts before reporting connection error. |
|
Number of seconds to wait for a response from SMTP server before reporting timeout error. |
|
Handler for the OnStatusChange event. |
|
Handler for the OnProgress event. |
Methods:
Sends simple text or HTML e-mail message synchronously. |
|
Sends simple text or HTML e-mail message with attachments synchronously. |
|
Imports HTML file and sends HTML e-mail with embedded images synchronously. |
|
Sends e-mail message synchronously. |
|
Sends e-mail message asynchronously. |
|
Returns status of e-mail message. |
|
Returns error code of failed e-mail message. |
|
Returns error description of failed e-mail message. |
|
Cancels sending of queued e-mail message. |
|
Cancels all queued e-mail messages. |
|
Returns error code of the last synchronous send operation. |
|
Returns error description of the last synchronous send operation. |
|
Returns number of e-mail messages queued for sending. |
Events:
Notifies of message status changes. |
|
Notifies of message sending progress. |