ActiveXperts Email Component provides an easy-to-use interface to SMTP and POP3 email communications. It's perfectly suited for situations in which emails have to be sent/received automatically, or in batches, from within applications, webservers, or from the command-line. It has proven its strength in many business environments over the years.
ActiveXperts Email Component features the following:
ActiveXperts Email Component includes samples for many development tools, including:
ActiveXperts Email Component is built on top of the Microsoft WinSock drivers. It does NOT replace any Windows drivers during installation; it neither adds any files or components to the Windows or Windows System directory.
The core of ActiveXperts Email Component is an ActiveX/COM component that comes in a 32-bit and a 64-bit version:
ActiveXperts Email Component can be distributed easily to many PC's. Once you have purchased the licenses, you copy the AxEmail32.dll or AxEmail64.dll to the PCs and register the DLL on that PC.
ActiveXperts Email Component Toolkit can be used by any of the following operating systems:
NOTE: On 64 bits systems, you can run 32- and 64 bit programs. To integrate ActiveXperts Email Component in a 64-bit (web) application of service, use the 64-bit AxEmail64.dll. To integrate ActiveXperts Email Component in a 32-bit (web) application of service, use the 32-bit AxEmail32.dll.
The ActiveXperts Email Component Toolkit can be used by any of the following programming languages:
The ActiveXperts Email Component package consists of 3 modules; any combination of components can be installed:
To automatically install ActiveXperts Email Component, download AxEmailSetup.exe and start the installation. The InstallShield wizard will guide you through the rest of the setup.
On 32-bit operating systems, it will automatically register the 32-bit ActiveX DLL 'AxEmail32.dll', to support 32-bit applications.
On 64-bit operating systems, it will automatically register the 64-bit ActiveX DLL 'AxEmail64.dll', to support 64-bit applications; it will also automatically register the 32-bit ActiveX DLL 'AxEmail32.dll', to support 32-bit applications.
To manually install the ActiveXperts Email Component core files, perform the following actions:
The ActiveXperts Email Component is an ActiveX component. ActiveX is a Microsoft framework for defining reusable software components in a programming language-independent way. This is why it's possible to use the Email Components in most programming and scripting languages available for Windows.
One of the most important aspects to using the Email Component may be creating an instance in the programming language of choice. Once a reference to the ActiveX component has been made and it's objects have been instantiated the use of this component should be very straightforward.
In this section a couple of programming environments are highlighted and their way to access the objects in the Email Component is demonstrated.
Add a reference to the Email Component object using the Visual Basic Solution Explorer:
The following code shows how to declare, create and use one of the Email Component objects:
Imports AxEmail ... Dim objSmtp As AxEmail.Smtp ' Declaration objSmtp = New AxEmail.Smtp() ' Creation ' Display version information Console.WriteLine("ActiveXperts Email Component {0}" & vbLf, objSmtp.Version)
Add a reference to the Email Component object using the Visual C# Solution Explorer:
The following code shows how to declare, create and use one of the Email Component objects:
using AxEmail;
...
AxEmail.Smtp objSmtp; // Declaration
objSmtp = new AxEmail.Smtp(); // Creation
// Display version information
Console.WriteLine("ActiveXperts Email Component {0}\n", objSmtp.Version);
The Email Component can be used in Visual Basic 6.x or higher. In Visual Basic, go to the 'Project/References...' menu item and check the box next to Email Component Type Library. Now, you can declare and create Email Component objects.
The following code shows how to declare, create and use one of the Email Component objects:
Dim objSmtp As AxEmail.Smtp ' Declaration Set objSmtp = New AxEmail.Smtp ' Creation ' Display version information Me.Caption = "ActiveXperts Email Component " & objSmtp.Version
ActiveXperts Email Component can be used in Visual C++ projects. To do so:
The following code shows how to declare, create and use one of the Email Component objects:
#import "AxEmail.tlb" #include "AxEmailConstants.h" ... CoInitialize(NULL); // Initialize COM AxEmail::ISmtpPtr oSmtp = NULL; // Declaration oSmtp.CreateInstance(__uuidof(AxEmail::Smtp)); // Creation ' Display version information _tprintf(_T("ActiveXperts Email Component %s\n"), (LPCTSTR)oSmtp->Version); oSmtp.Release(); CoUninitialize();
To use the Email Component objects in ASP classic make sure the component has been installed on the server.
The following code shows how to declare, create and use one of the Email Component objects:
<html>
<body>
Version:
<script language="vbscript" runat="server">
Set objSmtp = CreateObject("AxEmail.Smtp") ' Declaration and Creation
' Display version information
Response.Write "ActiveXperts Email Component " & objSmpp.Version
</script>
</body>
</html>
On top of your HTML/Javascript code, refer to the ActiveXperts Email Component in the following way:
<object codebase="http://activexperts.com/files/smtp-pop3-component/cab/4.1/axemail32.cab"
classid="CLSID:3BCF1B58-7071-4564-9D1D-FA008B19179A" ></object>
The following code shows how to declare, create and use one of the Email Component objects:
<script language="JavaScript" type="text/javascript">
var objSmtp = new ActiveXObject("AxEmail.Smtp") ' Declaration and Creation
' Display version information
document.write("<h1>ActiveXperts Email Component " + objSmtp.Version + "</h1>");
</script>
First, add a reference to the Email Component objects:
The following code shows how to declare, create and use one of the Email Component objects:
program Project1;
{$APPTYPE CONSOLE}
' Use ActiveX, Windows and AXEmail_TLB
uses
SysUtils, ActiveX, Windows,
AXEMAIL_TLB;
var
objSmtp: Smtp; ' Declaration
begin
CoInitialize(nil); ' Initialize COM
objSmtp := CoSmtp.Create; ' Creation
' Display version information
Writeln('ActiveXperts Email Component ' + objSmtp.Version);
CoUninitialize
end.
The Smtp object implements the SMTP (Simple Mail Transfer Protocol). The SMTP protocol is the de facto standard protocol for sending email through on the internet.
This object can be used to connect to a remote SMTP server and send out one or more email messages.
Send an email through the SMTP protocol
Set objSmtp = CreateObject("AxEmail.Smtp") ' Create the SMTP Protocol object
Set objMail = CreateObject("AxEmail.Message") ' Create the email message object
Wscript.Echo "ActiveXperts Email Component Version " & objSmtp.Version & "; Build " & _
objSmtp.Build & "; Module " & objSmtp.Module
WScript.Echo "License Status: " & objSmtp.LicenseStatus & vbCrLf
objSmtp.LogFile = "log.txt" ' Keep a session log
' Open a connection to the SMTP server
objSmtp.SetSecure
objSmtp.Connect "smtp.gmail.com", "me@gmail.com", "password"
If objSmtp.LastError <> 0 Then
WScript.Echo "Error: " & objSmtp.GetErrorDescription(objSmtp.LastError)
WScript.Quit
End If
' Compose an email message
objMail.FromAddress = "me@gmail.com"
objMail.FromName = "My Name"
objMail.Subject = "Hi !"
objMail.BodyPlainText = "Hello, How are you doing ?"
objMail.BodyHtml = "<html><body><h2>Hello</h2><p>How are you doing ?</p></body></html>"
objMail.AddTo "someone@example.com", "Someone"
' Send the email
objSmtp.Send objMail
If objSmtp.LastError <> 0 Then
WScript.Echo "Error: " & objSmtp.GetErrorDescription(objSmtp.LastError)
End If
' Disconnect from the server
objSmtp.Disconnect
WScript.Echo "Done !"
| Property | Type | Read/Write | Description |
| Version | String | Read | Version number of the ActiveXperts Email Component |
| Build | String | Read | Build number of the ActiveXperts Email Component |
| Module | String | Read | Module name of the ActiveXperts Email Component |
| LicenseStatus | String | Read | License Status |
| LicenseKey | String | In/Out | License Key |
| LastError | Number | Read | Result of the last called method |
| LogFile | String | Read/Write | The path to a logfile which can be used for troubleshooting |
| HostPort | Number | Read/Write | The host port of the SMTP server to connect to |
| Authentication | Number | Read/Write | The SMTP authentication method |
| UseStartTls | Boolean | Read/Write | Use a secure connection if possible |
| LastSmtpResponse | String | Read | Last SMTP response from the server |
| TimeoutConnect | Number | Read/Write | Timeout (msecs) for a connection to be established |
| TimeoutAuthentication | Number | Read/Write | Timeout (msecs) to authenticate |
| TimeoutCommand | Number | Read/Write | Timeout (msecs) for each SMTP command to complete |
| TimeoutData | Number | Read/Write | Timeout (msecs) for the SMTP DATA command to complete |
Return the version number of the ActiveXperts Email Component
Example:
Set objSmtp = CreateObject("AxEmail.Smtp")
Wscript.Echo "ActiveXperts Email Component Version " & objSmtp.Version & "; Build " & _
objSmtp.Build & "; Module " & objSmtp.Module
WScript.Echo "License Status: " & objSmtp.LicenseStatus & vbCrLf
...
Return the build number of the ActiveXperts Email Component.
Example:
Set objSmtp = CreateObject("AxEmail.Smtp")
Wscript.Echo "ActiveXperts Email Component Version " & objSmtp.Version & "; Build " & _
objSmtp.Build & "; Module " & objSmtp.Module
WScript.Echo "License Status: " & objSmtp.LicenseStatus & vbCrLf
...
Return the module name of the ActiveXperts Email Component.
Example:
Set objSmtp = CreateObject("AxEmail.Smtp")
Wscript.Echo "ActiveXperts Email Component Version " & objSmtp.Version & "; Build " & _
objSmtp.Build & "; Module " & objSmtp.Module
WScript.Echo "License Status: " & objSmtp.LicenseStatus & vbCrLf
...
The status of your license. In case you have not licensed the product, the property holds the trial expiration date. For details, see Product Activation.
Example:
Set objSmtp = CreateObject("AxEmail.Smtp") ' Create new instance
WScript.Echo "License Status: " & objSmtp.LicenseStatus
WScript.Echo "License Key: " & objSmtp.LicenseKey
A license key is required to unlock this component after the trial period has expired. Assign the LicenseKey property every time a new instance of this component is created (see code below). Alternatively, the LicenseKey property can be set automatically. This requires the license key to be stored in the registry. For details, see Product Activation.
Example:
Set objSmtp = CreateObject("AxEmail.Smtp") ' Create new instance
objSmtp.LicenseKey = "XXXXX-XXXXX-XXXXX" ' Assign your license key
WScript.Echo "LicenseKey: " & objSmtp.LicenseKey
Completion code of the last called function. To find the error description of a given error code, go to the online error codes codes page.
Example:
Set objSmtp = CreateObject("AxEmail.Smtp")
Set objMail = CreateObject("AxEmail.Message")
...
' Compose an email message
objMail.Subject = "Hi !"
objMail.BodyPlainText = "Hello, How are you doing ?"
objMail.BodyHtml = "<html><body><h2>Hello</h2><p>How are you doing ?</p></body></html>"
objMail.AddTo "someone@example.com", "Someone"
...
' Send the email
objSmtp.Send objMail
If objSmtp.LastError <> 0 Then
WScript.Echo "Error: " & objSmtp.GetErrorDescription(objSmtp.LastError)
End If
...
By default, LogFile holds an empty string and nothing is logged. If a valid file name is assigned to it, the ActiveXperts Email Component will write debug information to this file. Output data is written at the end of the file, the file is not cleared.
Example:
Set objSmtp = CreateObject("AxEmail.Smtp")
objSmtp.LogFile = "C:\temp\log.txt"
objSmtp.Connect "smtp.example.com", "me@example.com", "password"
...
This is the host port of the SMTP server to connect to. Set this property if the port is different from the standard SMTP port (25).
Example:
Set objSmtp = CreateObject("AxEmail.Smtp")
Set objMail = CreateObject("AxEmail.Message")
...
objSmtp.HostPort = 8025
objSmtp.Connect "smtp.example.com", "me@example.com", "password"
If objSmtp.LastError <> 0 Then
WScript.Echo "Error: " & objSmtp.GetErrorDescription(objSmtp.LastError)
WScript.Quit
End If
...
This is the authentication method that should be used. By default the preferred authentication method will be automatically detected.
Use one of these constants.
Example:
Set objSmtp = CreateObject("AxEmail.Smtp")
Set objConst = CreateObject("AxEmail.Constants")
Set objMail = CreateObject("AxEmail.Message")
...
objSmtp.Authentication = objConst.SMTP_AUTH_MD5CRAM
objSmtp.Connect "smtp.example.com", "me@example.com", "password"
If objSmtp.LastError <> 0 Then
WScript.Echo "Error: " & objSmtp.GetErrorDescription(objSmtp.LastError)
WScript.Quit
End If
...
Use a secure connection if supported by the SMTP server.
If the proprty is set to True, Connect will start a secure connection if the SMTP server supports it.
If the proprty is set to False, Connect will NOT start a secure connection, even in case the SMTP does support it.
Example:
Set objSmtp = CreateObject("AxEmail.Smtp")
Set objConst = CreateObject("AxEmail.Constants")
...
Set objSmtp.UseStartTls = False
objSmtp.Connect "smtp.example.com", "me@example.com", "password"
If objSmtp.LastError <> 0 Then
WScript.Echo "Error: " & objSmtp.GetErrorDescription(objSmtp.LastError)
WScript.Quit
End If
...
The last SMTP response from the server
Example:
Set objSmtp = CreateObject("AxEmail.Smtp")
Set objConst = CreateObject("AxEmail.Constants")
Set objMail = CreateObject("AxEmail.Message")
...
objSmtp.Connect "smtp.example.com", "me@example.com", "password"
WScript.Echo "Server response: " & objSmtp.LastSmtpResponse
If objSmtp.LastError <> 0 Then
WScript.Echo "Error: " & objSmtp.GetErrorDescription(objSmtp.LastError)
WScript.Quit
End If
...
Timeout (in milliseconds) for a connection to be established.
Example:
Set objSmtp = CreateObject("AxEmail.Smtp")
...
objSmtp.TimeoutConnect = 10000
objSmtp.Connect "smtp.example.com", "", ""
WScript.Echo "Server response: " & objSmtp.LastSmtpResponse
If objSmtp.LastError <> 0 Then
WScript.Echo "Error: " & objSmtp.GetErrorDescription(objSmtp.LastError)
WScript.Quit
End If
...
Timeout (in milliseconds) to authenticate to the SMTP mail server.
Example:
Set objSmtp = CreateObject("AxEmail.Smtp")
...
objSmtp.TimeoutAuthentication = 10000
objSmtp.Connect "smtp.example.com", "me@example.com", "password"
WScript.Echo "Server response: " & objSmtp.LastSmtpResponse
If objSmtp.LastError <> 0 Then
WScript.Echo "Error: " & objSmtp.GetErrorDescription(objSmtp.LastError)
WScript.Quit
End If
...
Timeout (in milliseconds) for each SMTP command to complete. This applies to all SMTP commands (e.g.: AUTH, RCPT TO, QUIT) except the DATA command.
Example:
Set objSmtp = CreateObject("AxEmail.Smtp")
...
objSmtp.Connect "smtp.example.com", "me@example.com", "password"
...
objSmtp.TimeoutCommand = 5000
objSmtp.Send( objMail )
...
Timeout (msecs) for the SMTP DATA command to complete.
Example:
Set objSmtp = CreateObject("AxEmail.Smtp")
...
objSmtp.Connect "smtp.example.com", "me@example.com", "password"
...
objSmtp.TimeoutData = 120000
objSmtp.Send( objMail )
...
| Method | Description |
| Clear | Reset all properties to their default values |
| SaveLicenseKey | Save the License Key in the registry |
| GetErrorDescription | Get the description of the given error |
| Sleep | Sleep for the specified number of milliseconds |
| SetSecure | Enables TLS/SSL and sets the correct port number |
| Connect | Connect to the SMTP server |
| Disconnect | Disconnect from the SMTP server |
| Send | Send an email message |
This function resets all properties to their default values.
Parameters:
Return value:
Always 0.
Example:Set objSmtp = CreateObject("AxEmail.Smtp")
....
objSmtp.Clear
...
Description:
Use SaveLicenseKey to store the license key permanently in the registry. When a license key is saved, it is restored automatically every time a new instance of the object is created. It is not recommended to save the license key if you distribute the component with your own software, because the key can be easily used by others.
Parameters:
Always 0. Check LastError property to see if the method was completed successfully.
Example:
Set objSmtp = CreateObject("AxEmail.Smtp") ' Create new instance
objSmtp.LicenseKey = "XXXXX-XXXXX-XXXXX"
objSmtp.SaveLicenseKey ' Save license key to registry
For more information, see Product Activation.
GetErrorDescription provides the error description of a given error code.
Parameters:
Return value:
The error string.
Example:Set objSmtp = CreateObject("AxEmail.Smtp")
...
WScript.Echo "result: " & objSmtp.LastError & ", " & _
objSmtp.GetErrorDescription(objSmtp.LastError)
This function suspends the current thread for the specified number of milliseconds.
Parameters:
Return value:
Always 0.
Example:Set objSmtp = CreateObject("AxEmail.Smtp")
....
objSmtp.Sleep 1000
...
This function makes sure TLS/SSL is enabled and the port number to connect on is set correctly.
Parameters:
Return value:
Always 0.
Example:Set objSmtp = CreateObject("AxEmail.Smtp")
Set objMail = CreateObject("AxEmail.Message")
...
objSmtp.SetSecure
objSmtp.Connect "smtp.gmail.com", "me@gmail.com", "password"
If objSmtp.LastError <> 0 Then
WScript.Echo "Error: " & objSmtp.GetErrorDescription(objSmtp.LastError)
WScript.Quit
End If
...
This function connects to the specified SMTP server
Parameters:
Return value:
Always 0.
Example:Set objSmtp = CreateObject("AxEmail.Smtp")
Set objMail = CreateObject("AxEmail.Message")
...
objSmtp.Connect "smtp.gmail.com", "me@gmail.com", "password"
If objSmtp.LastError <> 0 Then
WScript.Echo "Error: " & objSmtp.GetErrorDescription(objSmtp.LastError)
WScript.Quit
End If
...
This function disconnects from the SMTP server
Parameters:
Return value:
Always 0.
Example:Set objSmtp = CreateObject("AxEmail.Smtp")
Set objMail = CreateObject("AxEmail.Message")
...
objSmtp.Connect "smtp.gmail.com", "me@gmail.com", "password"
If objSmtp.LastError <> 0 Then
WScript.Echo "Error: " & objSmtp.GetErrorDescription(objSmtp.LastError)
WScript.Quit
End If
...
objSmtp.Disconnect
This functions sends the specified email.
Parameters:
Return value:
Always 0.
Example:Set objSmtp = CreateObject("AxEmail.Smtp")
Set objMail = CreateObject("AxEmail.Message")
...
objMail.BodyPlainText = "Hello, How are you doing ?"
objMail.BodyHtml = "<html><body><h2>Hello</h2><p>How are you doing ?</p></body></html>"
objMail.AddTo "someone@example.com", "Someone"
...
objSmtp.Send objMail
If objSmtp.LastError <> 0 Then
WScript.Echo "Error: " & objSmtp.GetErrorDescription(objSmtp.LastError)
End If
...
The Pop3 object can be used to connect to a POP3 server and receive email messages.
Receive email messages through the POP3 protocol
Set objPop3 = CreateObject("AxEmail.Pop3") ' Create the POP3 protocol object
Set objMail = CreateObject("AxEmail.Message") ' Create the email message object
Wscript.Echo "ActiveXperts Email Component Version " & objPop3.Version & "; Build " & _
objPop3.Build & "; Module " & objPop3.Module
WScript.Echo "License Status: " & objPop3.LicenseStatus & vbCrLf
objPop3.LogFile = "log.txt" ' Keep a session log
' Open a connection to the POP3 server
objPop3.SetSecure
objPop3.Connect "pop.gmail.com", "me@gmail.com", "password"
If objPop3.LastError <> 0 Then
WScript.Echo "Error: " & objPop3.GetErrorDescription(objPop3.LastError)
WScript.Quit
End If
' Retrieve all new messages
For i = 1 to objPop3.CountMessages()
Set objMail = objPop3.GetEmailMessage(i)
If objPop3.LastError <> 0 Then
WScript.Echo "Error: " & objPop3.GetErrorDescription(objPop3.LastError)
objPop3.Disconnect
WScript.Quit
End If
WScript.Echo "--------------------------------------------------------------"
WScript.Echo objMail.Date
WScript.Echo objMail.FromAddress
WScript.Echo objMail.Subject
WScript.Echo objMail.BodyPlainText
For j = 1 to objMail.CountAttachments()
strName = objMail.GetAttachmentName(j)
WScript.Echo " Attachment found: " & strName
' Uncomment the following lines to save the attachments.
'strPath = "C:\Temp\" & strName
'WScript.Echo " Saving attachment to : " & strPath
'objMail.SaveAttachment j, strPath
Next
Next
objPop3.Disconnect
WScript.Echo "Disconnected"
| Property | Type | Read/Write | Description |
| Version | String | Read | Version number of the ActiveXperts Email Component |
| Build | String | Read | Build number of the ActiveXperts Email Component |
| Module | String | Read | Module name of the ActiveXperts Email Component |
| LicenseStatus | String | Read | License Status |
| LicenseKey | String | In/Out | License Key |
| LastError | Number | Read | Result of the last called method |
| LogFile | String | Read/Write | The path to a logfile which can be used for troubleshooting |
| HostPort | Number | Read/Write | The host port for the POP3 server |
| Authentication | Number | Read/Write | The authentication method |
| LastPop3Response | String | Read/Write | The host port for the POP3 server |
| TimeoutConnect | Number | Read/Write | Timeout (msecs) for a connection to be established |
| TimeoutAuthentication | Number | Read/Write | Timeout (msecs) to authenticate |
| TimeoutCommand | Number | Read/Write | Timeout (msecs) for each POP3 command to complete |
| TimeoutData | Number | Read/Write | Timeout (msecs) for the POP3 RETR command to complete |
Return the version number of the ActiveXperts Email Component
Example:
Set objPop3 = CreateObject("AxEmail.Pop3")
Wscript.Echo "ActiveXperts Email Component Version " & objPop3.Version & "; Build " & _
objPop3.Build & "; Module " & objPop3.Module
WScript.Echo "License Status: " & objPop3.LicenseStatus & vbCrLf
...
Return the build number of the ActiveXperts Email Component.
Example:
Set objPop3 = CreateObject("AxEmail.Pop3")
Wscript.Echo "ActiveXperts Email Component Version " & objPop3.Version & "; Build " & _
objPop3.Build & "; Module " & objPop3.Module
WScript.Echo "License Status: " & objPop3.LicenseStatus & vbCrLf
...
Return the module name of the ActiveXperts Email Component.
Example:
Set objPop3 = CreateObject("AxEmail.Pop3")
Wscript.Echo "ActiveXperts Email Component Version " & objPop3.Version & "; Build " & _
objPop3.Build & "; Module " & objPop3.Module
WScript.Echo "License Status: " & objPop3.LicenseStatus & vbCrLf
...
The status of your license. In case you have not licensed the product, the property holds the trial expiration date. For details, see Product Activation.
Example:
Set objPop3 = CreateObject("AxEmail.Pop3") ' Create new instance
WScript.Echo "License Status: " & objPop3.LicenseStatus
WScript.Echo "License Key: " & objPop3.LicenseKey
A license key is required to unlock this component after the trial period has expired. Assign the LicenseKey property every time a new instance of this component is created (see code below). Alternatively, the LicenseKey property can be set automatically. This requires the license key to be stored in the registry. For details, see Product Activation.
Example:
Set objPop3 = CreateObject("AxEmail.Pop3") ' Create new instance
objPop3.LicenseKey = "XXXXX-XXXXX-XXXXX" ' Assign your license key
WScript.Echo "LicenseKey: " & objPop3.LicenseKey
Completion code of the last called function. To find the error description of a given error code, go to the online error codes codes page.
Example:
Set objPop3 = CreateObject("AxEmail.Pop3")
objPop3.Connect "pop.example.com", "me@example.com", "password"
If objPop3.LastError <> 0 Then
WScript.Echo "Error: " & objPop3.GetErrorDescription(objPop3.LastError)
WScript.Quit
End If
...
By default, LogFile holds an empty string and nothing is logged. If a valid file name is assigned to it, the ActiveXperts Email Component will write debug information to this file. Output data is written at the end of the file, the file is not cleared.
Example:
Set objPop3 = CreateObject("AxEmail.Pop3")
objPop3.LogFile = "C:\Temp\Pop3.log"
objPop3.Connect "pop.example.com", "me@example.com", "password"
If objPop3.LastError <> 0 Then
WScript.Echo "Error: " & objPop3.GetErrorDescription(objPop3.LastError)
WScript.Quit
End If
...
Set the host port to connect to. By default this is 110.
Example:
Set objPop3 = CreateObject("AxEmail.Pop3")
Set objMail = CreateObject("AxEmail.Message")
objPop3.HostPort = 8110
objPop3.Connect "pop.example.com", "me@example.com", "password"
If objPop3.LastError <> 0 Then
WScript.Echo "Error: " & objPop3.GetErrorDescription(objPop3.LastError)
WScript.Quit
End If
...
Set the authentication method to use on the POP3 server. By default it will autodetect the preferred method.
Example:
Set objPop3 = CreateObject("AxEmail.Pop3")
Set objMail = CreateObject("AxEmail.Message")
objPop3.Authentication = POP3_AUTH_PLAIN
objPop3.Connect "pop.example.com", "me@example.com", "password"
If objPop3.LastError <> 0 Then
WScript.Echo "Error: " & objPop3.GetErrorDescription(objPop3.LastError)
WScript.Quit
End If
...
Example:
Set objPop3 = CreateObject("AxEmail.Pop3")
Set objMail = CreateObject("AxEmail.Message")
objPop3.Connect "pop.example.com", "me@example.com", "password"
WScript.Echo "Server reponse: " & objPop3.LastPop3Response
If objPop3.LastError <> 0 Then
WScript.Echo "Error: " & objPop3.GetErrorDescription(objPop3.LastError)
WScript.Quit
End If
...
Timeout (in milliseconds) for a connection to be established.
Example:
Set objPop3 = CreateObject("AxEmail.Pop3")
objPop3.TimeoutConnect = 10000
objPop3.Connect "pop.example.com", "me@example.com", "password"
If objPop3.LastError <> 0 Then
WScript.Echo "Error: " & objPop3.GetErrorDescription(objPop3.LastError)
WScript.Quit
End If
...
Timeout (in milliseconds) to authenticate to the POP3 mail server.
Example:
Set objPop3 = CreateObject("AxEmail.Pop3")
objPop3.TimeoutAuthentication = 10000
objPop3.Connect "pop.example.com", "me@example.com", "password"
If objPop3.LastError <> 0 Then
WScript.Echo "Error: " & objPop3.GetErrorDescription(objPop3.LastError)
WScript.Quit
End If
...
Timeout (in milliseconds) for each POP3 command to complete. This applies to all POP3 commands (e.g.: APOP, CAPA, QUIT) except the RETR command.
Example:
Set objPop3 = CreateObject("AxEmail.Pop3")
objPop3.TimeoutCommand = 10000
For i = 1 to objPop3.CountMessages()
Set objMail = objPop3.GetEmailMessage(i)
If objPop3.LastError <> 0 Then
WScript.Echo "Error: " & objPop3.GetErrorDescription(objPop3.LastError)
objPop3.Disconnect
WScript.Quit
End If
WScript.Echo "--------------------------------------------------------------"
WScript.Echo objMail.Date
WScript.Echo objMail.FromAddress
WScript.Echo objMail.Subject
WScript.Echo objMail.BodyPlainText
Next
...
Timeout (msecs) for the POP3 RETR command to complete.
Example:
Set objPop3 = CreateObject("AxEmail.Pop3")
objPop3.TimeoutData = 120000
For i = 1 to objPop3.CountMessages()
Set objMail = objPop3.GetEmailMessage(i)
If objPop3.LastError <> 0 Then
WScript.Echo "Error: " & objPop3.GetErrorDescription(objPop3.LastError)
objPop3.Disconnect
WScript.Quit
End If
WScript.Echo "--------------------------------------------------------------"
WScript.Echo objMail.Date
WScript.Echo objMail.FromAddress
WScript.Echo objMail.Subject
WScript.Echo objMail.BodyPlainText
Next
...
| Method | Description |
| Clear | Reset all properties to their default values |
| SaveLicenseKey | Save the License Key in the registry |
| GetErrorDescription | Get the description of the given error |
| Sleep | Sleep for the specified number of milliseconds |
| SetSecure | Enable TLS/SSL and set the correct port number |
| Connect | Connect to the specified POP3 server |
| Disconnect | Disconnect from the POP3 server |
| IsConnected | Returns the connected state |
| CountMessages | Count the number of messages in the mail-drop |
| DeleteMessage | Delete a message from the mail-drop |
| GetEmailHeader | Retrieve the email header |
| GetEmailMessage | Retrieve the email message |
This function resets all properties to their default values.
Parameters:
Return value:
Always 0.
Example:Set objPop3 = CreateObject("AxEmail.Pop3")
....
objPop3.Clear
...
Description:
Use SaveLicenseKey to store the license key permanently in the registry. When a license key is saved, it is restored automatically every time a new instance of the object is created. It is not recommended to save the license key if you distribute the component with your own software, because the key can be easily used by others.
Parameters:
Always 0. Check LastError property to see if the method was completed successfully.
Example:
Set objPop3 = CreateObject("AxEmail.Pop3") ' Create new instance
objPop3.LicenseKey = "XXXXX-XXXXX-XXXXX"
objPop3.SaveLicenseKey ' Save license key to registry
For more information, see Product Activation.
GetErrorDescription provides the error description of a given error code.
Parameters:
Return value:
The error string.
Example:Set objPop3 = CreateObject("AxEmail.Pop3")
...
WScript.Echo "result: " & objPop3.LastError & ", " & _
objPop3.GetErrorDescription(objPop3.LastError)
This function suspends the current thread for the specified number of milliseconds.
Parameters:
Return value:
Always 0.
Example:Set objPop3 = CreateObject("AxEmail.Pop3")
...
objPop3.Sleep 1000
...
This function enables TLS/SSL and sets the correct port number.
Parameters:
Return value:
Always 0.
Example:Set objPop3 = CreateObject("AxEmail.Pop3")
Set objMail = CreateObject("AxEmail.Message")
...
objPop3.SetSecure
objPop3.Connect "pop.gmail.com", "me@gmail.com", "password"
If objPop3.LastError <> 0 Then
WScript.Echo "Error: " & objPop3.GetErrorDescription(objPop3.LastError)
WScript.Quit
End If
...
This function connects to the POP3 server.
Parameters:
Return value:
Always 0.
Example:Set objPop3 = CreateObject("AxEmail.Pop3")
Set objMail = CreateObject("AxEmail.Message")
...
objPop3.Connect "pop.gmail.com", "me@gmail.com", "password"
If objPop3.LastError <> 0 Then
WScript.Echo "Error: " & objPop3.GetErrorDescription(objPop3.LastError)
WScript.Quit
End If
...
This function disconnects from the POP3 server.
Parameters:
Return value:
Always 0.
Example:Set objPop3 = CreateObject("AxEmail.Pop3")
Set objMail = CreateObject("AxEmail.Message")
...
objPop3.Connect "pop.gmail.com", "me@gmail.com", "password"
If objPop3.LastError <> 0 Then
WScript.Echo "Error: " & objPop3.GetErrorDescription(objPop3.LastError)
WScript.Quit
End If
...
objPop3.Disconnect
This function returns the connected state. True is connected, False if not connected.
Parameters:
Return value:
Always 0.
Example:Set objPop3 = CreateObject("AxEmail.Pop3")
Set objMail = CreateObject("AxEmail.Message")
...
objPop3.Connect "pop.gmail.com", "me@gmail.com", "password"
If objPop3.LastError <> 0 Then
WScript.Echo "Error: " & objPop3.GetErrorDescription(objPop3.LastError)
WScript.Quit
End If
...
WScript.Echo objPop3.IsConnected
...
objPop3.Disconnect
This function requests the number of messages in the mail drop.
Parameters:
Return value:
The number of messages in the mail-drop
Example:Set objPop3 = CreateObject("AxEmail.Pop3")
Set objMail = CreateObject("AxEmail.Message")
...
For i = 1 to objPop3.CountMessages()
Set objMail = objPop3.GetEmailMessage(i)
If objPop3.LastError <> 0 Then
WScript.Echo "Error: " & objPop3.GetErrorDescription(objPop3.LastError)
objPop3.Disconnect
WScript.Quit
End If
WScript.Echo "--------------------------------------------------------------"
WScript.Echo objMail.Date
WScript.Echo objMail.FromAddress
WScript.Echo objMail.Subject
WScript.Echo objMail.BodyPlainText
Next
...
This function deletes a message from the mail-drop. This prevents the mail server from including this email on the next connect.
Parameters:
Return value:
Always 0.
Example:Set objPop3 = CreateObject("AxEmail.Pop3")
Set objMail = CreateObject("AxEmail.Message")
...
For i = 1 to objPop3.CountMessages()
Set objMail = objPop3.GetEmailMessage(i)
If objPop3.LastError <> 0 Then
WScript.Echo "Error: " & objPop3.GetErrorDescription(objPop3.LastError)
objPop3.Disconnect
WScript.Quit
End If
WScript.Echo "--------------------------------------------------------------"
WScript.Echo objMail.Date
WScript.Echo objMail.FromAddress
WScript.Echo objMail.Subject
WScript.Echo objMail.BodyPlainText
objPop3.DeleteMessage objMessage.ID
Next
...
This function only returns the email header. On most mail servers this will be faster than retrieving the entire message body.
Parameters:
Return value:
Always 0.
Example:Set objPop3 = CreateObject("AxEmail.Pop3")
Set objMail = CreateObject("AxEmail.Message")
...
For i = 1 to objPop3.CountMessages()
Set objMail = objPop3.GetEmailHeader(i)
If objPop3.LastError <> 0 Then
WScript.Echo "Error: " & objPop3.GetErrorDescription(objPop3.LastError)
objPop3.Disconnect
WScript.Quit
End If
WScript.Echo "--------------------------------------------------------------"
WScript.Echo objMail.Date
WScript.Echo objMail.FromAddress
WScript.Echo objMail.Subject
Next
...
This function retrieves the email message
Parameters:
Return value:
Always 0.
Example:Set objPop3 = CreateObject("AxEmail.Pop3")
Set objMail = CreateObject("AxEmail.Message")
...
For i = 1 to objPop3.CountMessages()
Set objMail = objPop3.GetEmailMessage(i)
If objPop3.LastError <> 0 Then
WScript.Echo "Error: " & objPop3.GetErrorDescription(objPop3.LastError)
objPop3.Disconnect
WScript.Quit
End If
WScript.Echo "--------------------------------------------------------------"
WScript.Echo objMail.Date
WScript.Echo objMail.FromAddress
WScript.Echo objMail.Subject
WScript.Echo objMail.BodyPlainText
Next
...
The Message object represents an email message. The POP3 protocol receives email messages and the SMTP protocol can be used to send email messages.
| Property | Type | Read/Write | Description |
| LastError | Number | Read | Result of the previously called function |
| Subject | String | Read/Write | The Subject of the message |
| BodyPlainText | String | Read/Write | The plain-text body of the message |
| BodyHtml | String | Read/Write | The html body of the message |
| Priority | Number | Read/Write | The Priority of the message. |
| FromName | String | Read/Write | The sender's name |
| FromAddress | String | Read/Write | The sender's email address |
| ReplyAddress | String | Read/Write | The Sender's reply-address. |
| ReadReceiptAddress | String | Read/Write | Email address to send a read receipt to |
| Organization | String | Read/Write | The sender's organization name |
| MessageSource | String | Read | The source of the email message |
| MessageHeader | String | Read | The header of the email message |
| Size | Number | Read | The sender's organization name |
| Date | String | Read | The email date |
| ToAddress | String | Read | The 'To' address(es) |
| CcAddress | String | Read | The 'Cc' address(es) |
| BccAddress | String | Read | The 'Bcc' address(es) |
| Encoding | Number | Read/Write | SMTP specific. Encoding used to send create this message |
| ID | Number | Read | POP3 specific, The email index on the server |
This read-only property indicates the result of the last called function. A zero indicates: success. Any non-zero value means an error.
For a complete list of error codes, check out the following page: www.activexperts.com/support/errorcodes.
Example:
Set objSmtpMail = CreateObject("AxEmail.Message")
...
objMessage.AddAttachment("C:\File.txt")
WScript.Echo "Result code: " & objMessage.LastError
...
This is the subject of the email message.
Example:
Set objMessage = CreateObject("AxEmail.Message")
...
objMessage.Subject = "This is an important message"
...
This is the plain text body of the message. When sending email, set this property to the plain text part of the email message. When receiving email, this property will be set to the plain text part if a plain text part is available.
Example:
Set objEMail = CreateObject("AxEmail.Message")
Set objConstants = CreateObject("AxEmail.Components")
...
objEMail.AddAttachment "C:\MySelf.jpg"
objEMail.AddAttachment "C:\MyWife.jpg"
objEMail.BodyPlainText = "Find a picture of myself and my wife attached to this email."
objEMail.BodyHtml = "<html><body>This <img SRC="cid:1"> is me" &_
"<br>and <img SRC="cid:2"> my wife<br></body></html>"
...
This is the HTML body of the message. When sending email, set this property to the HTML part of the email message. When receiving email, this property will be set to the HTML part if a HTML part is available.
Example:
Set objEMail = CreateObject("AxEmail.Message")
Set objConstants = CreateObject("AxEmail.Components")
...
objEMail.AddAttachment "C:\MySelf.jpg"
objEMail.AddAttachment "C:\MyWife.jpg"
objEMail.BodyPlainText = "Find a picture of myself and my wife attached to this email."
objEMail.BodyHtml = "<html><body>This <img SRC="cid:0000001"> is me" &_
"<br>and <img SRC="cid:0000002"> my wife<br></body></html>"
...
The email priority. This can be used by the email client, such as outlook, to control how to display this email.
Example:
Set objMessage = CreateObject("AxEmail.Message")
Set objConstants = CreateObject("AxEmail.Components")
...
objMessage.Priority = objConstants.EMAIL_MESSAGE_PRIORITY_HIGH
...
The name of the email sender. This file can be left empty.
Example:
Set objMessage = CreateObject("AxEmail.Message")
...
objMessage.FromAddress = "me@mydomain.doc"
objMessage.FromName = "This is Me"
...
Example:
Set objMessage = CreateObject("AxEmail.Message")
...
objMessage.FromAddress = "me@mydomain.doc"
objMessage.FromName = "This is Me"
...
The sender's reply address. If this is left empty the from address will be used as the reply address.
Example:
Set objMessage = CreateObject("AxEmail.Message")
...
objMessage.ReplyAddress = "myself@mydomain.com"
...
Email address of the person who should receive a 'read receipt'. The receipt is sent when the message recipient has displayed your message. This is useful when you are sending time-critical information, or any time you want confirmation that your message has been received.
Example:
Set objMessage = CreateObject("AxEmail.Message")
...
objMessage.ReadReceiptAddress = "myself@mydomain.com"
...
This is the sender name of the organization of the sender.
Example:
Set objMessage = CreateObject("AxEmail.Message")
...
objMessage.Organization = "My Organization"
...
This is the source of the email message.
Example:
Set objMessage = CreateObject("AxEmail.Message")
...
WScript.Echo objMessage.MessageSource
...
This is the header of the email message.
Example:
Set objMessage = CreateObject("AxEmail.Message")
...
WScript.Echo objMessage.MessageHeader
...
This is the sender name of the organization of the sender.
Example:
Set objMessage = CreateObject("AxEmail.Message")
...
WScript.Echo objMessage.Size
...
This returns the email date field.
Example:
Set objMessage = CreateObject("AxEmail.Message")
...
WScript.Echo objMessage.Date
...
Returns a 'comma seperated' string of 'To' addresses for this email.
Example:
Set objMessage = CreateObject("AxEmail.Message")
...
WScript.Echo objMessage.ToAddress
WScript.Echo objMessage.CcAddress
WScript.Echo objMessage.BccAddress
...
Returns a 'comma seperated' string of 'Cc' addresses for this email.
Example:
Set objMessage = CreateObject("AxEmail.Message")
...
WScript.Echo objMessage.ToAddress
WScript.Echo objMessage.CcAddress
WScript.Echo objMessage.BccAddress
...
Returns a 'comma seperated' string of 'Bcc' addresses for this email.
Example:
Set objMessage = CreateObject("AxEmail.Message")
...
WScript.Echo objMessage.ToAddress
WScript.Echo objMessage.CcAddress
WScript.Echo objMessage.BccAddress
...
When creating a message using a specific extended ASCII encoding, like ISO-8859-6 (Arabic), use this property to set the encoding to the proper value.
Use one of these values.
Example:
Set objMessage = CreateObject("AxEmail.Message")
Set objConstants = CreateObject("AxEmail.Components")
...
objMessage.Encoding = objConstants.EMAIL_MESSAGE_ENCODING_ARABIC
...
This is the index in the mail-drop on the POP3 server.
Example:
Set objMessage = CreateObject("AxEmail.Message")
...
WScript.Echo objMessage.ID
...
| Method | Description |
| Clear | Reset all properties to their default values |
| AddHeader | Add an additional header value to the email |
| GetHeaderValue | Get a header value from the email |
| AddTo | Add an email recipient |
| AddCc | Add a 'Carbon Copy' recipient |
| AddBcc | Add a 'Blind Carbon Copy' recipient |
| AddAttachment | Add an attachment to the email |
| CountAttachments | Number of attachments attached to the email |
| GetAttachmentName | Get the name of an attachment |
| GetAttachmentSize | Get the size of an attachment |
| SaveAttachment | Save the attachment to a file |
| Encode | Encode an email to mime |
| Decode | Decode the given email |
| LoadMIME | Load a MIME file |
| SaveMIME | Save a MIME file |
This function resets all properties to their default values.
Parameters:
Return value:
Always 0.
Example:Set objMessage = CreateObject("AxEmail.Message")
...
objMessage.Clear
...
This function will add a header value to the email.
Parameters:
Return value:
Always 0.
Example:Set objMessage = CreateObject("AxEmail.Message")
...
objMessage.AddHeader "X-Bender", "Bite my shiny metal ass."
...
This function returns the given header value if it can be found.
Parameters:
Return value:
The header value.
Example:Set objMessage = CreateObject("AxEmail.Message")
...
WScript.Echo objMessage.GetHeader("X-UIDL")
...
This functions adds an email recipient to the email.
Parameters:
Return value:
Always 0.
Example:Set objMessage = CreateObject("AxEmail.Message")
...
objMessage.AddTo "someone@example.com", "Someone"
objMessage.AddCc "myboss@example.com", "My Boss"
objMessage.AddBcc "coworker@example.com", "Co Worker"
...
This function adds a recipient to the 'Carbon Copy' (CC) list.
Parameters:
Return value:
Always 0.
Example:Set objMessage = CreateObject("AxEmail.Message")
...
objMessage.AddTo "someone@example.com", "Someone"
objMessage.AddCc "myboss@example.com", "My Boss"
objMessage.AddBcc "coworker@example.com", "Co Worker"
...
This function adds a recipient to the 'Blind Carbon Copy' (BCC) list
Parameters:
Return value:
Always 0.
Example:Set objMessage = CreateObject("AxEmail.Message")
...
objMessage.AddTo "someone@example.com", "Someone"
objMessage.AddCc "myboss@example.com", "My Boss"
objMessage.AddBcc "coworker@example.com", "Co Worker"
...
This function adds an attachment to the email.
Parameters:
Return value:
Always 0.
Example:Set objMessage = CreateObject("AxEmail.Message")
...
objMessage.AddAttachment "C:\Temp\file.zip"
If objMessage.LastError <> 0 Then
WScript.Echo "Error: " & objMessage.GetErrorDescription(objMessage.LastError)
End If
...
This function counts the number of attachments on this email
Parameters:
Return value:
The number of attachments
Example:Set objMessage = CreateObject("AxEmail.Message")
...
For j = 1 to objMail.CountAttachments()
strName = objMail.GetAttachmentName(j)
WScript.Echo " Attachment found: " & strName
strPath = "C:\Temp\" & strName
WScript.Echo " Saving attachment to : " & strPath
objMail.SaveAttachment j, strPath
Next
...
This function returns the filename of the attachment identified by the given ID. If the filename is not available it will return the name of the attachment.
The ID of the attachment ranges from 1 to CountAttachments
Parameters:
Return value:
The name of the attachment
Example:Set objMessage = CreateObject("AxEmail.Message")
...
For j = 1 to objMail.CountAttachments()
strName = objMail.GetAttachmentName(j)
WScript.Echo " Attachment found: " & strName
strPath = "C:\Temp\" & strName
WScript.Echo " Saving attachment to : " & strPath
objMail.SaveAttachment j, strPath
Next
...
This function returns the size of the attachment identified by the given ID. This is the size of the attachment before it is decoded.
The ID of the attachment ranges from 1 to CountAttachments
Parameters:
Return value:
The size of the attachment
Example:Set objMessage = CreateObject("AxEmail.Message")
...
For j = 1 to objMail.CountAttachments
strName = objMail.GetAttachmentName(j)
WScript.Echo " Attachment found: " & strName & "; Size: " & objMail.GetAttachmentSize(j)
strPath = "C:\Temp\" & strName
WScript.Echo " Saving attachment to : " & strPath
objMail.SaveAttachment j, strPath
Next
...
This function saves the attachment identified by the given Id.
The ID of the attachment ranges from 1 to CountAttachments
Parameters:
Return value:
Always 0.
Example:Set objMessage = CreateObject("AxEmail.Message")
...
For j = 1 to objMail.CountAttachments
strName = objMail.GetAttachmentName(j)
WScript.Echo " Attachment found: " & strName
strPath = "C:\Temp\" & strName
WScript.Echo " Saving attachment to : " & strPath
objMail.SaveAttachment j, strPath
Next
...
This function actually encodes the email to the MIME format.
If you are creating a MIME encoded message to send it out at a later time always call this function before calling SaveMIME.
Parameters:
Return value:
Always 0.
Example:Set objMessage = CreateObject("AxEmail.Message")
...
objMessage.Encode
...
This function will decode a MIME file.
This function is automatically called when receiving or loading a MIME encoded message. This function never needs to be called.
Parameters:
Return value:
Always 0.
Example:Set objMessage = CreateObject("AxEmail.Message")
...
objMessage.Decode
...
This function loads a MIME encoded email from file.
Parameters:
Return value:
Always 0.
Example:Set objMessage = CreateObject("AxEmail.Message")
...
objMessage.LoadMIME "C:\Temp\Test.mime"
If objMessage.LastError <> 0 Then
WScript.Echo "Error: " & objMessage.GetErrorDescription(objMessage.LastError)
End If
...
This function saves a MIME encoded file
Parameters:
Return value:
Always 0.
Example:Set objMessage = CreateObject("AxEmail.Message")
...
objMessage.SaveMIME "C:\Temp\Test.mime"
If objMessage.LastError <> 0 Then
WScript.Echo "Error: " & objMessage.GetErrorDescription(objMessage.LastError)
End If
...
In the ActiveXperts Email Component, all email constants are grouped together in a separate object called Constants. First create the constants object before you can actually use the constants:
Set objConstants = CreateObject("AxEmail.Constants")
...
WScript.Echo objConstants.EMAIL_MESSAGE_PRIORITY_HIGHEST
WScript.Echo objConstants.EMAIL_MESSAGE_PRIORITY_HIGH
WScript.Echo objConstants.EMAIL_MESSAGE_PRIORITY_MEDIUM
WScript.Echo objConstants.EMAIL_MESSAGE_PRIORITY_LOW
WScript.Echo objConstants.EMAIL_MESSAGE_PRIORITY_LOWEST
...
| Constant | Value | Description |
| EMAIL_MESSAGE_PRIORITY_HIGHEST | Highest priority | |
| EMAIL_MESSAGE_PRIORITY_HIGH | High priority | |
| EMAIL_MESSAGE_PRIORITY_MEDIUM | Normal priority (default) | |
| EMAIL_MESSAGE_PRIORITY_LOW | Low priority | |
| EMAIL_MESSAGE_PRIORITY_LOWEST | Lowest priority |
| Constant | Value | Description |
| EMAIL_MESSAGE_ENCODING_DEFAULT | Uses the Operating System's current codepage | |
| EMAIL_MESSAGE_ENCODING_THAI | ISO-8859-11 encoding | |
| EMAIL_MESSAGE_ENCODING_JAPANESE | ISO-2022-jp encoding | |
| EMAIL_MESSAGE_ENCODING_CHINESE_SIMP | GB2312 encoding | |
| EMAIL_MESSAGE_ENCODING_KOREAN | KSC-5601 encoding | |
| EMAIL_MESSAGE_ENCODING_CHINESE_TRAD | BIG5 encoding | |
| EMAIL_MESSAGE_ENCODING_CENTRALEUROPE | ISO-8859-2 encoding | |
| EMAIL_MESSAGE_ENCODING_RUSSIAN | ISO-8859-5 encoding | |
| EMAIL_MESSAGE_ENCODING_WESTERN | ISO-8859-1 encoding | |
| EMAIL_MESSAGE_ENCODING_GREEK | ISO-8859-7 encoding | |
| EMAIL_MESSAGE_ENCODING_TURKISH | ISO-8859-3 encoding | |
| EMAIL_MESSAGE_ENCODING_HEBREW | ISO-8859-8 encoding | |
| EMAIL_MESSAGE_ENCODING_ARABIC | ISO-8859-6 encoding | |
| EMAIL_MESSAGE_ENCODING_BALTIC | ISO-8859-4 encoding | |
| EMAIL_MESSAGE_ENCODING_VIETNAMESE | WINDOWS-1258 encoding | |
| EMAIL_MESSAGE_ENCODING_UTF7 | UTF-7 encoding | |
| EMAIL_MESSAGE_ENCODING_UTF8 | UTF-8 encoding |
| Constant | Value | Description |
| SMTP_AUTH_AUTO | Auto detect (default) | |
| SMTP_AUTH_PLAIN | AUTH-PLAIN authentication | |
| SMTP_AUTH_LOGIN | AUTH-LOGIN authentication | |
| SMTP_AUTH_MD5CRAM | AUTH-CRAM-MD5 authentication |
| Constant | Value | Description |
| POP3_AUTH_AUTO | Auto detect (default) | |
| POP3_AUTH_PLAIN | AUTH-PLAIN authentication | |
| POP3_AUTH_APOP | APOP authentication |
Samples for Visual Basic, Visual Basic .NET, Visual C++, Visual C# .NET, ASP and VBScript are included as part of the installation. You can also find the samples on our ftp site at ftp://ftp.activexperts-labs.com/samples/smtp-pop3-component/.
Visit the ActiveXperts Support Site for a complete list of FAQ items at:
http://www.activexperts.com/support
To contact support, please send an email to: support@activexperts.com
Please visit www.activexperts.com/sales to buy the product. Here, you can also find the latest prices.
You can also contact us via email: sales@activexperts.com
After purchasing the product, you will receive a license key.
There are four ways to activate (unlock) the component using this license key:
1. Directly from your program code
You can unlock the component by using the LicenseKey property. This way, the license is NOT stored in the registry of the computer. This is the recommended way when distributing this component with your own software.
2. Store the license key in the registry - Installation
When the license key is entered during Setup (AxEmailSetup.exe, available from the ActiveXperts download site),
the license key will be saved in the following registry key:
'HKEY_LOCAL_MACHINE\Software\ActiveXperts\Email Component\LicenseKey'
Once the license key is stored in the registry, the LicenseKey property will be assigned automatically with that value each time the object is instantiated.
3. Store the license key in the registry - Manually
You can enter the license key manually (e.g. through REGEDIT.EXE) in following registry key:
'HKEY_LOCAL_MACHINE\Software\ActiveXperts\Email Component\LicenseKey'
Once the license key is stored in the registry, the LicenseKey property will be assigned automatically with that value each time the object is instantiated.
4. Store the license key in the registry - SaveLicenseKey method
You can enter the license key by calling the SaveLicenseKey method. You need to call SaveLicenseKey only once.
Set objSmtp = CreateObject("AxEmail.Smtp") ' Create new instance
objSmtp.LicenseKey = "XXXXX-XXXXX-XXXXX" ' Replace XXXXX-XXXXX-XXXXX by your own key
objSmtp.SaveLicenseKey
Once the license key is stored in the registry, the LicenseKey property will be assigned automatically with that value each time the object is instantiated.
PLEASE READ THIS SOFTWARE LICENSE AGREEMENT CAREFULLY BEFORE
DOWNLOADING OR USING THE SOFTWARE. BY CLICKING ON THE
"ACCEPT" BUTTON, OPENING THE PACKAGE, DOWNLOADING THE PRODUCT,
OR USING THE EQUIPMENT THAT CONTAINS THIS PRODUCT, YOU ARE
CONSENTING TO BE BOUND BY THIS AGREEMENT. IF YOU DO NOT AGREE
TO ALL OF THE TERMS OF THIS AGREEMENT, CLICK THE "DO NOT
ACCEPT" BUTTON AND THE INSTALLATION PROCESS WILL NOT CONTINUE,
RETURN THE PRODUCT TO THE PLACE OF PURCHASE FOR A FULL REFUND,
OR DO NOT DOWNLOAD THE PRODUCT.
GENERAL
In this Software License Agreement:
(i) "ActiveXperts" means ActiveXperts Software B.V.
(ii) "Customer" means the individual(s), organization or business entity
buying a license of the Software from ActiveXperts or its Distributors
or its Resellers.
(iii) "Software" means computer programs (and their storage medium)
supplied by ActiveXperts and known collectively as "ActiveXperts Email Component"
in which ActiveXperts has property rights and any user manuals,
operating instructions, brochures and all other documentation relating
to the said computer programs (the expression "Software" to include all
or any part or any combination of Software).
1. LICENSE GRANT
ActiveXperts grants Customer the following rights provided that you
comply with all terms and conditions of this License Agreement:
(a) Installation and use. Customer may install, use, access, display and
run one copy of the Software on a single computer, such as a
workstation, terminal or other device ("Workstation Computer"). A
"License Pack" allows you to install, use, access, display and run
additional copies of the Software up to the number of "Licensed Copies"
specified above.
(b) Reservation of Rights. ActiveXperts reserves all rights not
expressly granted to you in this License Agreement.
2. UPGRADES AND SUPPLEMENTS
To use a product identified as an upgrade, you must first be licensed
for the Software as eligible for the upgrade. After upgrading, Customer
may no longer use the product that formed the basis for Customer's
upgrade eligibility.
This License Agreement applies to updates or supplements to the original
Software provided by ActiveXperts, unless we provide other terms along
with the update or supplement.
3. LIMITATION ON REVERSE ENGINEERING,DECOMPILATION, AND DISASSEMBLY
Customer may not reverse engineer, decompile, or disassemble the
Software, except and only to the extent that it is expressly permitted
by applicable law notwithstanding this limitation.
4. TERMINATION
Without prejudice to any other rights, ActiveXperts may cancel this
License Agreement if Customer does not abide by the terms and conditions
of this License Agreement, in which case you must destroy all copies of
the Software and all of its component parts.
5. NOT FOR RESALE SOFTWARE
Software identified as "Not for Resale" or "NFR," may not be resold,
transferred or used for any purpose other than demonstration, test or
evaluation.
6. LIMITED WARRANTY
ActiveXperts warrants that for a period of ninety (90) days from the
date of shipment from ActiveXperts: (i) the media on which the Software
is furnished will be free of defects in materials and workmanship under
normal use; and (ii) the Software substantially conforms to its
published specifications. Except for the foregoing, the Software is
provided AS IS. This limited warranty extends only to Customer as the
original licensee. Customer's exclusive remedy and the entire liability
of ActiveXperts and its suppliers under this limited warranty will be,
at ActiveXperts or its service center's option, repair, replacement, or
refund of the Software if reported (or, upon request, returned) to the
party supplying the Software to Customer. In no event does ActiveXperts
warrant that the Software is error free or that Customer will be able to
operate the Software without problems or interruptions.
This warranty does not apply if the software (a) has been altered,
except by ActiveXperts, (b) has not been installed, operated, repaired,
or maintained in accordance with instructions supplied by ActiveXperts,
(c) has been subjected to abnormal physical or electrical stress,
misuse, negligence, or accident, or (d) is used in ultrahazardous
activities.
7. LIMITATION OF LIABILITY AND REMEDIES.
Notwithstanding any damages that you might incur for any reason
whatsoever (including, without limitation, all damages referenced above
and all direct or general damages), the entire liability of ActiveXperts
and any of its suppliers under any provision of this License Agreement
and your exclusive remedy for all of the foregoing (except for any
remedy of repair or replacement elected by ActiveXperts with respect to
any breach of the Limited Warranty) shall be limited to the greater of
the amount actually paid by you for the Software or U.S.$5.00. The
foregoing limitations, exclusions and disclaimers (including Sections 4,
5 and 6 above) shall apply to the maximum extent permitted by applicable
law, even if any remedy fails its essential purpose.
8. ENTIRE AGREEMENT
This License Agreement (including any addendum or amendment to this
License Agreements which is included with the Software) are the entire
agreement between you and ActiveXperts relating to the Software and the
support services (if any) and they supersede all prior or
contemporaneous oral or written communications, proposals and
representations with respect to the Software or any other subject matter
covered by this License Agreement. To the extent the terms of any
ActiveXperts policies or programs for support services conflict with the
terms of this License Agreement, the terms of this License Agreement
shall control.
This Agreement shall be construed in accordance with the laws of The
Netherlands and the Dutch courts shall have sole jurisdiction in any
dispute relating to these conditions. If any part of these conditions
shall be or become invalid or unenforceable in any way and to any extent
by any existing or future rule of law, order, statute or regulation
applicable thereto, then the same shall to the extent of such invalidity
or enforceability be deemed to have been deleted from the conditions
which shall remain in full force and effect as regards all other
provisions.
9. Copyright
The Software is protected by copyright and other intellectual property
laws and treaties. ActiveXperts or its suppliers own the title,
copyright, and other intellectual property rights in the Software. The
Software is licensed, not sold.
© 2011 ActiveXperts Software B.V.
contact@activexperts.com