EASendMailObj consists of two objects: IMail and IFastSender. IMail interface provides the basis of sending email. It supports CC, BCC, multiple attachments and ESMTP authentication. It fully supports asynchronous operating mode and event driving. It also provides advanced features such as embedded picture, alternative text, email digital signature and email encryption. IFastSender interface enables your application to send mass email in a threadings-pool with highest performance. Both IMail and IFastSender can send email under SSL/TLS channel.
Maximum no. of worker thread for sending email.
Domain name to send in HELO/EHLO command.
Remove all unsent emails from FastSender object.
Get total count of current worker threads in FastSender object.
Get the total count of current idle worker threads in FastSender object.
Get total count of unsent emails in FastSender object.
Submit email to threading-pool of FastSender object.
Submit email to threading-pool of FastSender object for sending email by IIS SMTP service pickup.
Stop all worker threads in FastSender object.
Submit email to threading-pool of FastSender object for validating email address.
Occur when an email was sent by FastSender object.
The following code demonstrates how to use FastSender object to send mass emails.
[VB6, VBA - Send Mass Email with Multiple Threads] Option Explicit Const ConnectNormal = 0 Const ConnectSSLAuto = 1 Const ConnectSTARTTLS = 2 Const ConnectDirectSSL = 3 Const ConnectTryTLS = 4 Private WithEvents m_oFastSender As EASendMailObjLib.FastSender Private m_oSmtp As EASendMailObjLib.Mail Private Sub SendEmail() Dim recipientAddr(3) As String Dim i As Integer If m_oFastSender Is Nothing Or m_oSmtp Is Nothing Then Set m_oFastSender = New EASendMailObjLib.FastSender Set m_oSmtp = New EASendMailObjLib.Mail ' for evaluation usage, please use "TryIt" as the license code. m_oSmtp.LicenseCode = "TryIt" m_oFastSender.MaxThreads = 10 'set the maximum no. of worker threads End If ' Your SMTP server address. m_oSmtp.ServerAddr = "smtp.emailarchitect.net" ' User and password for ESMTP authentication m_oSmtp.UserName = "email@example.com" m_oSmtp.Password = "testpassword" ' If server supports SSL/TLS connection, SSL/TLS is used automatically. m_oSmtp.ConnectType = ConnectTryTLS m_oSmtp.FromAddr = "firstname.lastname@example.org" recipientAddr(0) = "email@example.com" recipientAddr(1) = "firstname.lastname@example.org" recipientAddr(2) = "email@example.com" For i = 0 To 2 m_oSmtp.ClearRecipient m_oSmtp.AddRecipient recipientAddr(i), recipientAddr(i), 0 m_oSmtp.Subject = "test subject" m_oSmtp.BodyText = "test body" Call m_oFastSender.Send(m_oSmtp, i, "any") Next End Sub Private Sub m_oFastSender_OnSent(ByVal lRet As Long, _ ByVal ErrDesc As String, _ ByVal nKey As Long, _ ByVal tParam As String, _ ByVal Sender As String, _ ByVal Recipients As String) If lRet = 0 Then MsgBox nKey & " email was sent successfully" Else MsgBox nKey & ": " & ErrDesc End If End Sub
Send Bulk Email with Multiple Threads in Visual C++
Send Bulk Email with Multiple Threads in VB6
Send Bulk Email with Multiple Threads in Delphi
Programming with FastSender
Work with EASendMail Service(Mail Queuing)