ActiveEmail Manual

© 1999-2011 ActiveXperts Software B.V.  contact@activexperts.com

 

1. Introduction

1.1. Introduction

ActiveEmail provides an easy-to-use interface to SMTP and POP3 e-mail communications. It's perfectly suited for situations in which e-mails have to be sent/received automatically, or in batches, from within applications, webservers, or from the command-line. The performance of the engine is outstanding, due to its multi-threaded architecture and its (optional) queuing features. It has proven its strength in many business environments over the years.

ActiveEmail features the following:

  • Send messages using SMTP;
  • Receive messages using POP3;
  • Embedded objects in message body, like sounds, images, etc.;
  • Connect to secure server using TLS / SSL
  • SMTP authorization, supporting AUTH PLAIN, AUTH LOGIN and AUTH CRAM-MD5 login algorithms;
  • POP3 authorization, supporting Plain text and APOP3 authorization;
  • Load and save MIME files;
  • Mailqueue to improve performance of scripts;
  • Detailed error descriptions;
  • Advanced tracing (for troubleshooting purposes);
  • Windows Event Logging;
  • And more.

ActiveEmail can be used by any of the following operating systems:

  • Windows 2008 (32-bit and 64-bit)
  • Windows 2003 (32-bit and 64-bit)
  • Windows 2000 (32-bit)
  • Windows 7 (32-bit and 64-bit)
  • Windows Vista (32-bit and 64-bit)
  • Windows XP (32-bit and 64-bit)

ActiveEmail includes samples for many development tools, including:

  • Visual Basic .NET - Windows .NET based application;
  • Visual C# .NET - Windows .NET based applications;
  • Visual Basic 5.x or higher - Windows based applications;
  • Visual C++ 5.x or higher - Windows based applications;
  • ASP .NET - Web site based on Active Server Pages and the .NET Framework;
  • ASP 2.x - Web site based on Active Server Pages (server-side scripting);
  • PHP - Embedded HTML scripting;
  • VBScript - Windows based scripts;
  • Java/Javascript - Java based scripts;
  • HTML - Client scripts within HTML pages;
  • Any other development platform that supports ActiveX/COM components.

1.2. Architecture

ActiveEmail 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 ActiveEmail is an ActiveX/COM component that comes in a 32-bit and a 64-bit version:

  • AEmail.dll - the 'ActiveEmail COM Component' for 32-bit platforms;
  • AEmailx64.dll - the 'ActiveEmail COM Component' for 64-bit platforms;

ActiveEmail can be distributed easily to many PC's. Once you have purchased the licenses, you copy the AEmail.dll to the PCs and register the DLL on that PC.

2. System requirements

2.1. System requirements

ActiveEmail Toolkit can be used by any of the following operating systems:

  • Windows 2008 - x86 (32-bit) and x64 (64-bit)
  • Windows 2003 - x86 (32-bit) and x64 (64-bit)
  • Windows 2000 Server and Professional x86 (32-bit) only
  • Windows 7 - x86 (32-bit) and x64 (64-bit)
  • Windows Vista - x86 (32-bit) and x64 (64-bit)
  • Windows XP - x86 (32-bit) and x64 (64-bit)

NOTE: On 64 bits systems, you can run 32- and 64 bit programs. To integrate ActiveEmail in a 64-bit (web) application of service, use the 64-bit AEmailx64.dll. To integrate ActiveEmail in a 32-bit (web) application of service, use the 32-bit AEmail.dll.

2.2. Supported platforms

The ActiveEmail Toolkit can be used by any of the following programming languages:

  • Visual Basic .NET
  • Visual C# .NET
  • Visual Basic 5.x or higher
  • Visual C++ 5.x or higher
  • Delphi 6.x or higher
  • ASP .NET
  • ASP 2.x
  • PHP
  • ColdFusion
  • VBScript
  • Java/Javascript
  • HTML
  • Any other development platform that supports ActiveX/COM components

3. Installation

3.1. Introduction

The ActiveEmail Toolkit package consists of 4 components; any combination of components can be installed:

  • The ActiveEmail Toolkit COM component - the interface to COM compliant applications; product includes 32 bit dll (AEmail.dll) and 64 bit dll (AEmailx64.dll);
  • The Queue Server Configuration Program (optional) - to enable queuing of SMTP messages;
  • The ActiveEmail Toolkit Help Files - documentation;
  • The ActiveEmail Toolkit Sample Files - samples for various development platforms.

3.2. Single computer

Simply run the AEMAIL.EXE Setup program. The InstallShield wizard will guide you through the rest of the setup.
If you choose the ActiveEmail Toolkit COM component, the Setup program can perform the registration of the COM component for you. But it will also give you the opportunity to register the object yourself.

Any subsequent installation of ActiveEmail Toolkit can be performed either manually or by using the Setup program.

3.3. Multiple computers

Any subsequent installations can be performed using the setup program.
Since the installation of the core components is very easy, you may want to do it manually, or integrate it into your companies software distribution program.

If you choose to install the COM component manually on other machines, simply perform the following actions:

  • Copy the AEmail.dll (for 32-bit platforms) or AEmailx64.dll (for 64-bit platforms) to a destination location on the new machine;
  • Register the COM component by using the following command on 32-bit platforms: REGSVR32 <dest-location>\AEmail.dll
  • Register the COM component by using the following command on 64-bit platforms: REGSVR32 <dest-location>\AEmailx64.dll

If you choose to install the Queue component manually on another machine, simply perform the following actions:

  • Copy the AEMailQ.exe (the ActiveEmail Queue Service) to a destination location on the new machine;
  • Install the service by giving the following command:INSTSVR <dest-location>\AEMailQ.exe.exe
  • Specify the Queue-directory in the registry:
        Key: HKEY_LOCAL_MACHINE\Software\ActiveXperts\ActiveEmail\PickupMailDir
        Data-type: REG_SZ
        Value: <a UNC path>

Queuing:

  • If you use queuing, ALL computers that you want to make use of the queue, must have the
      HKEY_LOCAL_MACHINE\Software\ActiveXperts\ActiveEmail\PickupMailDir
    value set. It must have the same value as the PickupMailDir value on the Queuing computer.
Click here to read more about the ActiveEmail Queue Configuration.

4. How to use

4.1. Introduction

The following code snippets (VBScript) illustrate how to use various ActiveEmail objects.

Send e-mail using SMTP

Send an e-mail through the SMTP protocol.

  Set objSmtp = CreateObject("ActiveEmail.Smtp")          ' Create the SMTP Protocol object
  Set objMail = CreateObject("ActiveEmail.EmailMessage")  ' Create the e-mail message object

  Wscript.Echo "ActiveEmail Version " & objSmtp.Version & "; Build " & _
    objSmtp.Build & "; Module " & objSmtp.Module
  WScript.Echo "Expiration date: " & objSmtp.ExpirationDate & 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 e-mail 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 e-mail
  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 !"

Receive e-mails through POP3

Receive e-mail messages through the POP3 protocol

  Set objPop3 = CreateObject("ActiveEmail.Pop3")          ' Create the POP3 protocol object
  Set objMail = CreateObject("ActiveEmail.EmailMessage")  ' Create the e-mail message object

  Wscript.Echo "ActiveEmail Version " & objPop3.Version & "; Build " & _
    objPop3.Build & "; Module " & objPop3.Module
  WScript.Echo "Expiration date: " & objPop3.ExpirationDate & 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"

4.2. Visual Basic .NET

Make sure the ActiveEmail Toolkit is installed on your system. For details about installation, click here.

Add a reference to the object using the Visual Basic Solution Explorer:

  • Start the Solution Provider, go to the project's 'References' container;
  • Choose 'Add Reference' from the context menu;
  • Select the COM tab, choose the 'ActiveEmail' component.

You can use different ActiveEmail objects in one Visual Basic .NET application. The following code shows how to declare and create all ActiveEmail objects:

Imports AEmail

Dim objConstants As EMailConstants               ' Declaration
objConstants = New EMailConstants()              ' Creation

Dim objEmail As EMailMessage                     ' Declaration
objEmail = New EMailMessage()                    ' Creation

Dim objSmtp As Smtp                              ' Declaration
objSmtp = New Smtp()                             ' Creation

Dim objPop3 As Pop3                              ' Declaration
objPop3 = New Pop3()                             ' Creation

After these declarations and creation of the object(s), you can use the objects inside your Visual Basic .NET project.

4.3. Visual C# .NET

Make sure the ActiveEmail Toolkit is installed on your system. For details about installation, click here.

Add a reference to the object using the Visual C# Solution Explorer:

  • Start the Solution Provider, go to the project's 'References' container;
  • Choose 'Add Reference' from the context menu;
  • Select the COM tab, choose the 'ActiveEmail' component.

You can use different ActiveEmail objects in one Visual C# .NET application. The following code shows how to declare and create the ActiveEmail objects:

using AEMAILLib

EMailConstants objConstants;                      // Declaration
objConstants = new EMailConstants();              // Creation

objEmail EMailMessage;                            // Declaration
objEmail = new EMailMessage();                    // Creation

objSmtp Smtp;                                     // Declaration
objSmtp = new Smtp();                             // Creation

objPop3 Pop3;                                     // Declaration
objPop3 = new Pop3();                             // Creation

After these declarations and creation of the object(s), you can use the objects inside your Visual C# .NET project.

4.4. Visual Basic

ActiveEmail can be used in Visual Basic 5.x or higher. In Visual Basic, go to the 'Project/References...' menu item and check the box next to ActiveEmail Type Library. Now, you can declare and create ActiveEmail objects.

Create new ActiveEmail objects using the 'CreateObject' function:

Dim objConstants As AEMAILLib.EMailConstants                    ' Declaration
Set objConstants = CreateObject("ActiveEmail.EMailConstants")   ' Creation

Dim objEmail  As AEMAILLib.EMailMessage                         ' Declaration
Set objEmail = CreateObject( "ActiveEmail.EMailMessage")        ' Creation

Dim objSmtp As AEMAILLib.Smtp                                   ' Declaration
Set objSmtp = CreateObject( "ActiveEmail.Smtp" )                ' Creation

Dim objPop3 As AEMAILLib.Pop3                                   ' Declaration
Set objPop3 = CreateObject( "ActiveEmail.Pop3" )                ' Creation

After these declarations and creation of the object(s), you can use the objects inside your Visual Basic 5.x/6.x project.

4.5. Visual C++

ActiveEmail can be used in Visual C++ projects. Include the *.h and *.c file provided by ActiveXperts to bind your code to the ActiveEmail component. These files are located in the Include directory of the Visual C++ samples directory. These are the files:

  • AEmail_i.h
  • AEmail_i.c

Declare and create new ActiveEmail objects like this:

IEMailConstants *pConstants;                                    
CoCreateInstance(CLSID_EMailConstants, NULL, CLSCTX_INPROC_SERVER, IID_IEMailConstants, (void**) &pConstants );

IEMailMessage *pEMail;             
CoCreateInstance(CLSID_EMailMessage, NULL, CLSCTX_INPROC_SERVER, IID_IEMailMessage, (void**) &pEMail );

ISmtpS *pSmtp;              
CoCreateInstance(CLSID_Smtp, NULL, CLSCTX_INPROC_SERVER, IID_ISmtp, (void**) &pSmtp ); 

IPop3 *pPop3;
CoCreateInstance(CLSID_Pop3, NULL, CLSCTX_INPROC_SERVER, IID_IPop3, (void**) &pPop3 ); 

Visual C++ samples are installed as part of the product, but can also be found on our website.

4.6. ASP 2.x

<html>
<body>
Version:
<script language=vbscript runat=server>
  Set objSmtpServer = CreateObject( "ActiveEmail.Smtp" )
  Response.Write objSmtp.Version
</script>
</body>
</html>

5. API reference

5.1. Smtp

The Smtp object can be used to connect to a remote SMTP server and send out one or more e-mail messages.

Send e-mail through SMTP

Send an e-mail through the SMTP protocol

  Set objSmtp = CreateObject("ActiveEmail.Smtp")          ' Create the SMTP Protocol object
  Set objMail = CreateObject("ActiveEmail.EmailMessage")  ' Create the e-mail message object

  Wscript.Echo "ActiveEmail Version " & objSmtp.Version & "; Build " & _
    objSmtp.Build & "; Module " & objSmtp.Module
  WScript.Echo "Expiration date: " & objSmtp.ExpirationDate & 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 e-mail 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 e-mail
  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 !"

Properties

Property Type Read/Write Description
Version String Read Version number of the ActiveEmail
Build String Read Build number of the ActiveEmail
Module String Read Module name of the ActiveEmail
ExpirationDate String Read Expiration date of the ActiveEmail
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

Functions

Function Description
Activate Activate the product
Clear Reset all properties to their default values
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 e-mail message
Queue Queue an e-mail message

Version property

Return the version number of the ActiveEmail

Example:

  Set objSmtp = CreateObject("ActiveEmail.Smtp")
  Wscript.Echo "ActiveEmail Version " & objSmtp.Version & "; Build " & _
    objSmtp.Build & "; Module " & objSmtp.Module
  WScript.Echo "Expiration date: " & objSmtp.ExpirationDate & vbCrLf
  ...

Build property

Return the build number of the ActiveEmail.

Example:

  Set objSmtp = CreateObject("ActiveEmail.Smtp")
  Wscript.Echo "ActiveEmail Version " & objSmtp.Version & "; Build " & _
    objSmtp.Build & "; Module " & objSmtp.Module
  WScript.Echo "Expiration date: " & objSmtp.ExpirationDate & vbCrLf
  ...

Module property

Return the module name of the ActiveEmail.

Example:

  Set objSmtp = CreateObject("ActiveEmail.Smtp")
  Wscript.Echo "ActiveEmail Version " & objSmtp.Version & "; Build " & _
    objSmtp.Build & "; Module " & objSmtp.Module
  WScript.Echo "Expiration date: " & objSmtp.ExpirationDate & vbCrLf
  ...

ExpirationDate property

Return the expiration date of the ActiveEmail.

Example:

  Set objSmtp = CreateObject( "ActiveEmail.Smtp" )
  Wscript.Echo "ActiveEmail Version " & objSmtp.Version & "; Build " & _
    objSmtp.Build & "; Module " & objSmtp.Module
  WScript.Echo "Expiration date: " & objSmtp.ExpirationDate & vbCrLf
  ...

LastError property

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("ActiveEmail.Smtp")
  ...  
  Set objMessage = CreateObject("ActiveEmail.SmsMessage")
  objMessage.ToAddress = "+31611223344"
  objMessage.Body = "Short text message"
  objSmtp.SendSms objMessage
  WScript.Echo "Send SMS result: " &  objSmtp.LastError    ' Is our message sent ?  
  ...

LogFile property

By default, LogFile holds an empty string and nothing is logged. If a valid file name is assigned to it, the ActiveEmail 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("ActiveEmail.Smtp")
  objSmtp.LogFile = "C:\temp\log.txt"
  ...
  Set objMessage = CreateObject("ActiveEmail.SmsMessage")
  objMessage.ToAddress = "+31611223344"
  objMessage.Body = "Short text message"
  objSmtp.SendSms objMessage
  ...

HostPort property

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("ActiveEmail.Smtp")
  Set objMail = CreateObject("ActiveEmail.EmailMessage")
  ...
  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
  ...

Authentication property

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("ActiveEmail.Smtp")
  Set objConst = CreateObject("ActiveEmail.EmailConstants")
  Set objMail = CreateObject("ActiveEmail.EmailMessage")
  ...
  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
  ...

UseStartTls property

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("ActiveEmail.Smtp")
  Set objConst = CreateObject("ActiveEmail.EmailConstants")
  ...
  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
  ...

LastSmtpResponse property

The last SMTP response from the server

Example:

  Set objSmtp = CreateObject("ActiveEmail.Smtp")
  Set objConst = CreateObject("ActiveEmail.EmailConstants")
  Set objMail = CreateObject("ActiveEmail.EmailMessage")
  ...  
  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
  ...

TimeoutConnect property

Timeout (in milliseconds) for a connection to be established.

Example:

  Set objSmtp = CreateObject("ActiveEmail.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
  ...

TimeoutAuthentication property

Timeout (in milliseconds) to authenticate to the SMTP mail server.

Example:

  Set objSmtp = CreateObject("ActiveEmail.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
  ...

TimeoutCommand property

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("ActiveEmail.Smtp")
  ...  
  objSmtp.Connect "smtp.example.com", "me@example.com", "password"
  ... 
  objSmtp.TimeoutCommand = 5000  
  objSmtp.Send( objMail )
  ...

TimeoutData property

Timeout (msecs) for the SMTP DATA command to complete.

Example:

  Set objSmtp = CreateObject("ActiveEmail.Smtp")
  ...  
  objSmtp.Connect "smtp.example.com", "me@example.com", "password"
  ...  
  objSmtp.TimeoutData = 120000   
  objSmtp.Send( objMail )
  ...

Activate function

This function activates the ActiveEmail product. A valid registration code should be passed as parameter.

Parameters:

  • The registration key
  • Persistent - this optional Boolean variable (default: True) specifies whether you want to add the registration key to the registry. If you pass 'True', you need to call the 'Activate' function only once for that computer. If you pass 'False', you need to call 'Activate' each time you create the object on that computer. This can be useful for customers who own a Distribution License of the product but do not want to show the registration key to their customers (see also here).

Return value:

Always 0. Check LastError property to see if the function was completed successfully.

Example:
  Set objSmtp = CreateObject("ActiveEmail.Smtp")   
              
    objSmtp.Activate "xxxxx-xxxxx-xxxxx", True
    ...

Clear function

This function resets all properties to their default values.

Parameters:

  • None

Return value:

Always 0.

Example:
  Set objSmtp = CreateObject("ActiveEmail.Smtp")   
    ....
    objSmtp.Clear
    ...

GetErrorDescription function

GetErrorDescription provides the error description of a given error code.

Parameters:

  • The error code

Return value:

The error string.

Example:
  Set objSmtp = CreateObject("ActiveEmail.Smtp")
    ...
    WScript.Echo "result: " & objSmtp.LastError & ", " & _
      objSmtp.GetErrorDescription(objSmtp.LastError)

Sleep function

This function suspends the current thread for the specified number of milliseconds.

Parameters:

  • Milliseconds to sleep

Return value:

Always 0.

Example:
  Set objSmtp = CreateObject("ActiveEmail.Smtp")
    ....
    objSmtp.Sleep 1000
    ...

SetSecure function

This function makes sure TLS/SSL is enabled and the port number to connect on is set correctly.

Parameters:

  • (Optional) Port number, default: 465

Return value:

Always 0.

Example:
  Set objSmtp = CreateObject("ActiveEmail.Smtp")
    Set objMail = CreateObject("ActiveEmail.EmailMessage")
    ...  
    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
    ...

Connect function

This function connects to the specified SMTP server

Parameters:

  • Hostname
  • Account name
  • Password

Return value:

Always 0.

Example:
  Set objSmtp = CreateObject("ActiveEmail.Smtp")
    Set objMail = CreateObject("ActiveEmail.EmailMessage")
    ...  
    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
    ...

Disconnect function

This function disconnects from the SMTP server

Parameters:

  • None

Return value:

Always 0.

Example:
  Set objSmtp = CreateObject("ActiveEmail.Smtp")
    Set objMail = CreateObject("ActiveEmail.EmailMessage")
    ...  
    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

Send function

This functions sends the specified e-mail.

Parameters:

  • EMail object

Return value:

Always 0.

Example:
  Set objSmtp = CreateObject("ActiveEmail.Smtp")
    Set objMail = CreateObject("ActiveEmail.EmailMessage")
    ...
    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
    ...

Queue function

This function puts an SMTP message into the queue. The ActiveEmail Queue Service will pick it up and send it to the SMTP server. You do NOT need to establish a conection to the mail server first (this is done by the ActiveEmail Queue Server service).

Parameters:

  • An e-mail object
  • Host - Hostname or IP address of the mail server
  • Port - Port number
  • Secure - should a secure connection be used
  • Account - Account to be used to login (optional)
  • Secure - Password to be used to login (optional)

Return value:

Always 0.

Example:
  Set objSmtp = CreateObject("ActiveEmail.Smtp")
    Set objMail = CreateObject("ActiveEmail.EmailMessage")
    ...
    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.Queue objMail, "mail.mycompany.intra", 25, False, "", ""
    If objSmtp.LastError <> 0 Then
      WScript.Echo "Error: " & objSmtp.GetErrorDescription(objSmtp.LastError)    
    End If
    ...

5.2. Pop3

The Pop3 object can be used to connect to a POP3 server and receive e-mail messages.

Receive e-mails through POP3

Receive e-mail messages through the POP3 protocol

  Set objPop3 = CreateObject("ActiveEmail.Pop3")          ' Create the POP3 protocol object
  Set objMail = CreateObject("ActiveEmail.EmailMessage")  ' Create the e-mail message object

  Wscript.Echo "ActiveEmail Version " & objPop3.Version & "; Build " & _
    objPop3.Build & "; Module " & objPop3.Module
  WScript.Echo "Expiration date: " & objPop3.ExpirationDate & 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"

Properties

Property Type Read/Write Description
Version String Read Version number of the ActiveEmail
Build String Read Build number of the ActiveEmail
Module String Read Module name of the ActiveEmail
ExpirationDate String Read Expiration date of the ActiveEmail
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
Timeout Number Read/Write Connection timeout
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

Functions

Function Description
Clear Reset all properties to their default values
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 e-mail header
GetEmailMessage Retrieve the e-mail message

Version property

Return the version number of the ActiveEmail

Example:

  Set objPop3 = CreateObject("ActiveEmail.Pop3")
  Wscript.Echo "ActiveEmail Version " & objPop3.Version & "; Build " & _
    objPop3.Build & "; Module " & objPop3.Module
  WScript.Echo "Expiration date: " & objPop3.ExpirationDate & vbCrLf
  ...

Build property

Return the build number of the ActiveEmail.

Example:

  Set objPop3 = CreateObject("ActiveEmail.Pop3")
  Wscript.Echo "ActiveEmail Version " & objPop3.Version & "; Build " & _
    objPop3.Build & "; Module " & objPop3.Module
  WScript.Echo "Expiration date: " & objPop3.ExpirationDate & vbCrLf
  ...

Module property

Return the module name of the ActiveEmail.

Example:

  Set objPop3 = CreateObject("ActiveEmail.Pop3")
  Wscript.Echo "ActiveEmail Version " & objPop3.Version & "; Build " & _
    objPop3.Build & "; Module " & objPop3.Module
  WScript.Echo "Expiration date: " & objPop3.ExpirationDate & vbCrLf
  ...

ExpirationDate property

Return the expiration date of the ActiveEmail.

Example:

  Set objPop3 = CreateObject( "ActiveEmail.Pop3" )
  Wscript.Echo "ActiveEmail Version " & objPop3.Version & "; Build " & _
    objPop3.Build & "; Module " & objPop3.Module
  WScript.Echo "Expiration date: " & objPop3.ExpirationDate & vbCrLf
  ...

LastError property

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("ActiveEmail.Pop3")
  ...  
  Set objMessage = CreateObject("ActiveEmail.SmsMessage")
  objMessage.ToAddress = "+31611223344"
  objMessage.Body = "Short text message"
  objPop3.SendSms objMessage
  WScript.Echo "Send SMS result: " &  objPop3.LastError    ' Is our message sent ?  
  ...

LogFile property

By default, LogFile holds an empty string and nothing is logged. If a valid file name is assigned to it, the ActiveEmail 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("ActiveEmail.Pop3")
  objPop3.LogFile = "C:\temp\log.txt"
  ...
  Set objMessage = CreateObject("ActiveEmail.SmsMessage")
  objMessage.ToAddress = "+31611223344"
  objMessage.Body = "Short text message"
  objPop3.SendSms objMessage
  ...

HostPort property

Set the host port to connect to. By default this is 110.

Example:

  Set objPop3 = CreateObject("ActiveEmail.Pop3")
  Set objMail = CreateObject("ActiveEmail.EmailMessage")

  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
  ...

Authentication property

Set the authentication method to use on the POP3 server. By default it will autodetect the preferred method.

Example:

  Set objPop3 = CreateObject("ActiveEmail.Pop3")
  Set objMail = CreateObject("ActiveEmail.EmailMessage")

  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
  ...

Timeout property

Set the connection timeout in milliseconds

Example:

  Set objPop3 = CreateObject("ActiveEmail.Pop3")
  Set objMail = CreateObject("ActiveEmail.EmailMessage")

  objPop3.Timeout = 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
  ...

LastPop3Response property

Example:

  Set objPop3 = CreateObject("ActiveEmail.Pop3")
  Set objMail = CreateObject("ActiveEmail.EmailMessage")
  
  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
  ...

TimeoutConnect property

Timeout (in milliseconds) for a connection to be established.

Example:

  Set objPop3 = CreateObject("ActiveEmail.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
  ...

TimeoutAuthentication property

Timeout (in milliseconds) to authenticate to the POP3 mail server.

Example:

  Set objPop3 = CreateObject("ActiveEmail.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
  ...

TimeoutCommand property

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("ActiveEmail.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
  ...

TimeoutData property

Timeout (msecs) for the POP3 RETR command to complete.

Example:

  Set objPop3 = CreateObject("ActiveEmail.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
  ...

Clear function

This function resets all properties to their default values.

Parameters:

  • None

Return value:

Always 0.

Example:
  Set objPop3 = CreateObject("ActiveEmail.Pop3")   
  ....
  objPop3.Clear
  ...

GetErrorDescription function

GetErrorDescription provides the error description of a given error code.

Parameters:

  • The error code

Return value:

The error string.

Example:
  Set objPop3 = CreateObject("ActiveEmail.Pop3")
  ...
  WScript.Echo "result: " & objPop3.LastError & ", " & _
    objPop3.GetErrorDescription(objPop3.LastError)

Sleep function

This function suspends the current thread for the specified number of milliseconds.

Parameters:

  • Milliseconds to sleep

Return value:

Always 0.

Example:
  Set objPop3 = CreateObject("ActiveEmail.Pop3")
  ...
  objPop3.Sleep 1000
  ...

SetSecure function

This function enables TLS/SSL and sets the correct port number.

Parameters:

  • Port number. Default: 995

Return value:

Always 0.

Example:
  Set objPop3 = CreateObject("ActiveEmail.Pop3")
  Set objMail = CreateObject("ActiveEmail.EmailMessage")
  ...
  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
  ...

Connect function

This function connects to the POP3 server.

Parameters:

  • Hostname
  • Account
  • Password

Return value:

Always 0.

Example:
  Set objPop3 = CreateObject("ActiveEmail.Pop3")
  Set objMail = CreateObject("ActiveEmail.EmailMessage")
  ...  
  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
  ...

Disconnect function

This function disconnects from the POP3 server.

Parameters:

  • None

Return value:

Always 0.

Example:
  Set objPop3 = CreateObject("ActiveEmail.Pop3")
  Set objMail = CreateObject("ActiveEmail.EmailMessage")
  ...  
  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

IsConnected function

This function returns the connected state. True is connected, False if not connected.

Parameters:

  • None

Return value:

Always 0.

Example:
  Set objPop3 = CreateObject("ActiveEmail.Pop3")
  Set objMail = CreateObject("ActiveEmail.EmailMessage")
  ...  
  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

CountMessages function

This function requests the number of messages in the mail drop.

Parameters:

  • None

Return value:

The number of messages in the mail-drop

Example:
  Set objPop3 = CreateObject("ActiveEmail.Pop3")
  Set objMail = CreateObject("ActiveEmail.EmailMessage")
  ...
  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
  ...

DeleteMessage function

This function deletes a message from the mail-drop. This prevents the mail server from including this e-mail on the next connect.

Parameters:

  • Message Id

Return value:

Always 0.

Example:
  Set objPop3 = CreateObject("ActiveEmail.Pop3")
  Set objMail = CreateObject("ActiveEmail.EmailMessage")
  ...
  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
  ...

GetEmailHeader function

This function only returns the e-mail header. On most mail servers this will be faster than retrieving the entire message body.

Parameters:

  • Message Id

Return value:

Always 0.

Example:
  Set objPop3 = CreateObject("ActiveEmail.Pop3")
  Set objMail = CreateObject("ActiveEmail.EmailMessage")
  ...
  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
  ...

GetEmailMessage function

This function retrieves the e-mail message

Parameters:

  • Message Id

Return value:

Always 0.

Example:
  Set objPop3 = CreateObject("ActiveEmail.Pop3")
  Set objMail = CreateObject("ActiveEmail.EmailMessage")
  ...
  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
  ...

5.3. EMailMessage

The EMailMessage object represents an e-mail message. The POP3 protocol receives e-mail messages and the SMTP protocol can be used to send e-mail messages.

Properties

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 e-mail address
ReplyAddress String Read/Write The Sender's reply-address.
ReadReceiptAddress String Read/Write E-mail address to send a read receipt to
Organization String Read/Write The sender's organization name
MessageSource String Read The source of the e-mail message
MessageHeader String Read The header of the e-mail message
Size Number Read The sender's organization name
Date String Read The e-mail 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 e-mail index on the server

Functions

Function Description
Clear Reset all properties to their default values
AddHeader Add an additional header value to the e-mail
GetHeaderValue Get a header value from the e-mail
AddTo Add an e-mail recipient
AddCc Add a 'Carbon Copy' recipient
AddBcc Add a 'Blind Carbon Copy' recipient
AddAttachment Add an attachment to the e-mail
CountAttachments Number of attachments attached to the e-mail
GetAttachmentName Get the name of an attachment
GetAttachmentSize Get the size of an attachment
SaveAttachment Save the attachment to a file
Encode Encode an e-mail to mime
Decode Decode the given e-mail
LoadMIME Load a MIME file
SaveMIME Save a MIME file

LastError property

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("ActiveEmail.EMailMessage")
  ...
  objEMailMessage.AddAttachment( "C:\File.txt" )
  WScript.Echo "Result code: " & objEMailMessage.LastError
  ...

Subject property

This is the subject of the e-mail message.

Example:

  Set objEMailMessage = CreateObject("ActiveEmail.EMailMessage")
  ...
  objEMailMessage.Subject = "This is an important message"
  ...

BodyPlainText property

This is the plain text body of the message. When sending e-mail, set this property to the plain text part of the e-mail message. When receiving e-mail, this property will be set to the plain text part if a plain text part is available.

Example:

  Set objEMail = CreateObject("ActiveEmail.EMailMessage")
  Set objConstants = CreateObject("ActiveEmail.EMailConstants")
  ...
  objEMail.AddAttachment "C:\MySelf.jpg"
  objEMail.AddAttachment "C:\MyWife.jpg"
  objEMail.BodyPlainText = "Find a picture of myself and my wife attached to this e-mail."
  objEMail.BodyHtml = "<html><body>This <img SRC="cid:1"> is me" &_
                      "<br>and <img SRC="cid:2"> my wife<br></body></html>"
  ...

BodyHtml property

This is the HTML body of the message. When sending e-mail, set this property to the HTML part of the e-mail message. When receiving e-mail, this property will be set to the HTML part if a HTML part is available.

Example:

  Set objEMail = CreateObject("ActiveEmail.EMailMessage")
  Set objConstants = CreateObject("ActiveEmail.EMailConstants")
  ...
  objEMail.AddAttachment "C:\MySelf.jpg"
  objEMail.AddAttachment "C:\MyWife.jpg"
  objEMail.BodyPlainText = "Find a picture of myself and my wife attached to this e-mail."
  objEMail.BodyHtml = "<html><body>This <img SRC="cid:0000001"> is me" &_
                             "<br>and <img SRC="cid:0000002"> my wife<br></body></html>"
  ...

Priority property

The e-mail priority. This can be used by the e-mail client, such as outlook, to control how to display this e-mail.

Example:

  Set objEMailMessage = CreateObject("ActiveEmail.EMailMessage")
  Set objConstants = CreateObject("ActiveEmail.EMailConstants")
  ...
  objEMailMessage.Priority =  objConstants.EMAIL_MESSAGE_PRIORITY_HIGH
  ...

FromName property

The name of the e-mail sender. This file can be left empty.

Example:

  Set objEMailMessage = CreateObject("ActiveEmail.EMailMessage")
  ...
  objEMailMessage.FromAddress = "me@mydomain.doc"
  objEMailMessage.FromName = "This is Me"
  ...

FromAddress property

Example:

  Set objEMailMessage = CreateObject("ActiveEmail.EMailMessage")
  ...
  objEMailMessage.FromAddress = "me@mydomain.doc"
  objEMailMessage.FromName = "This is Me"
  ...

ReplyAddress property

The sender's reply address. If this is left empty the from address will be used as the reply address.

Example:

  Set objEMailMessage = CreateObject("ActiveEmail.EMailMessage")
  ...
  objEMailMessage.ReplyAddress = "myself@mydomain.com"
  ...

ReadReceiptAddress property

E-mail 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 objEMailMessage = CreateObject("ActiveEmail.EMailMessage")
  ...
  objEMailMessage.ReadReceiptAddress = "myself@mydomain.com"
  ...

Organization property

This is the sender name of the organization of the sender.

Example:

  Set objEMailMessage = CreateObject("ActiveEmail.EMailMessage")
  ...
  objEMailMessage.Organization = "My Organization"
  ...

MessageSource property

This is the source of the e-mail message.

Example:

  Set objEMailMessage = CreateObject("ActiveEmail.EMailMessage")
  ...
  WScript.Echo objEMailMessage.MessageSource
  ...

MessageHeader property

This is the header of the e-mail message.

Example:

  Set objEMailMessage = CreateObject("ActiveEmail.EMailMessage")
  ...
  WScript.Echo objEMailMessage.MessageHeader
  ...

Size property

This is the sender name of the organization of the sender.

Example:

  Set objEMailMessage = CreateObject("ActiveEmail.EMailMessage")
  ...
  WScript.Echo objEMailMessage.Size
  ...

Date property

This returns the e-mail date field.

Example:

  Set objEMailMessage = CreateObject("ActiveEmail.EMailMessage")
  ...
  WScript.Echo objEMailMessage.Date
  ...

ToAddress property

Returns a 'comma seperated' string of 'To' addresses for this e-mail.

Example:

  Set objEMailMessage = CreateObject("ActiveEmail.EMailMessage")
  ...
  WScript.Echo objEMailMessage.ToAddress
  WScript.Echo objEMailMessage.CcAddress
  WScript.Echo objEMailMessage.BccAddress
  ...

CcAddress property

Returns a 'comma seperated' string of 'Cc' addresses for this e-mail.

Example:

  Set objEMailMessage = CreateObject("ActiveEmail.EMailMessage")
  ...
  WScript.Echo objEMailMessage.ToAddress
  WScript.Echo objEMailMessage.CcAddress
  WScript.Echo objEMailMessage.BccAddress
  ...

BccAddress property

Returns a 'comma seperated' string of 'Bcc' addresses for this e-mail.

Example:

  Set objEMailMessage = CreateObject("ActiveEmail.EMailMessage")
  ...
  WScript.Echo objEMailMessage.ToAddress
  WScript.Echo objEMailMessage.CcAddress
  WScript.Echo objEMailMessage.BccAddress
  ...

Encoding property

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 objEMailMessage = CreateObject("ActiveEmail.EMailMessage")
  Set objConstants = CreateObject("ActiveEmail.EMailConstants")
  ...
  objEMailMessage.Encoding = objConstants.EMAIL_MESSAGE_ENCODING_ARABIC
  ...

ID property

This is the index in the mail-drop on the POP3 server.

Example:

  Set objEMailMessage = CreateObject("ActiveEmail.EMailMessage")
  ...
  WScript.Echo objEMailMessage.ID  
  ...

Clear function

This function resets all properties to their default values.

Parameters:

  • None

Return value:

Always 0.

Example:
  Set objEMailMessage = CreateObject("ActiveEmail.EMailMessage")   
  ...
  objEMailMessage.Clear
  ...

AddHeader function

This function will add a header value to the e-mail.

Parameters:

  • Name
  • Value

Return value:

Always 0.

Example:
  Set objEMailMessage = CreateObject("ActiveEmail.EMailMessage")   
  ...
  objEMailMessage.AddHeader "X-Bender", "Bite my shiny metal ass."
  ...

GetHeaderValue function

This function returns the given header value if it can be found.

Parameters:

  • None

Return value:

The header value.

Example:
  Set objEMailMessage = CreateObject("ActiveEmail.EMailMessage")   
  ...
  WScript.Echo objEMailMessage.GetHeader("X-UIDL")
  ...

AddTo function

This functions adds an e-mail recipient to the e-mail.

Parameters:

  • E-mail address
  • Display name

Return value:

Always 0.

Example:
  Set objEMailMessage = CreateObject("ActiveEmail.EMailMessage")   
  ...
  objEMailMessage.AddTo "someone@example.com", "Someone"
  objEMailMessage.AddCc "myboss@example.com", "My Boss"
  objEMailMessage.AddBcc "coworker@example.com", "Co Worker"
  ...

AddCc function

This function adds a recipient to the 'Carbon Copy' (CC) list.

Parameters:

  • E-mail address
  • Display name

Return value:

Always 0.

Example:
  Set objEMailMessage = CreateObject("ActiveEmail.EMailMessage")   
  ...
  objEMailMessage.AddTo "someone@example.com", "Someone"
  objEMailMessage.AddCc "myboss@example.com", "My Boss"
  objEMailMessage.AddBcc "coworker@example.com", "Co Worker"
  ...

AddBcc function

This function adds a recipient to the 'Blind Carbon Copy' (BCC) list

Parameters:

  • E-mail address
  • Display name

Return value:

Always 0.

Example:
  Set objEMailMessage = CreateObject("ActiveEmail.EMailMessage")   
  ...
  objEMailMessage.AddTo "someone@example.com", "Someone"
  objEMailMessage.AddCc "myboss@example.com", "My Boss"
  objEMailMessage.AddBcc "coworker@example.com", "Co Worker"
  ...

AddAttachment function

This function adds an attachment to the e-mail.

Parameters:

  • Filename of the attachment

Return value:

Always 0.

Example:
  Set objEMailMessage = CreateObject("ActiveEmail.EMailMessage")   
  ...
  objEMailMessage.AddAttachment "C:\Temp\file.zip"
  If objEMailMessage.LastError <> 0 Then
    WScript.Echo "Error: " & objEMailMessage.GetErrorDescription(objEmailMessage.LastError)
  End If
  ...

CountAttachments function

This function counts the number of attachments on this e-mail

Parameters:

  • none

Return value:

The number of attachments

Example:
  Set objEMailMessage = CreateObject("ActiveEmail.EMailMessage")   
  ...
  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  
  ...

GetAttachmentName function

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:

  • Attachment ID

Return value:

The name of the attachment

Example:
  Set objEMailMessage = CreateObject("ActiveEmail.EMailMessage")   
  ...
  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  
  ...

GetAttachmentSize function

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:

  • Attachment ID

Return value:

The size of the attachment

Example:
  Set objEMailMessage = CreateObject("ActiveEmail.EMailMessage")   
  ...
  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  
  ...

SaveAttachment function

This function saves the attachment identified by the given Id.

The ID of the attachment ranges from 1 to CountAttachments

Parameters:

  • Attachment ID
  • Filename to save the attachment to

Return value:

Always 0.

Example:
  Set objEMailMessage = CreateObject("ActiveEmail.EMailMessage")   
  ...
  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  
  ...

Encode function

This function actually encodes the e-mail 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:

  • None

Return value:

Always 0.

Example:
  Set objEMailMessage = CreateObject("ActiveEmail.EMailMessage")   
  ...
  objEMailMessage.Encode
  ...

Decode function

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:

  • None

Return value:

Always 0.

Example:
  Set objEMailMessage = CreateObject("ActiveEmail.EMailMessage")   
  ...
  objEMailMessage.Decode
  ...

LoadMIME function

This function loads a MIME encoded e-mail from file.

Parameters:

  • The file name to load from

Return value:

Always 0.

Example:
  Set objEMailMessage = CreateObject("ActiveEmail.EMailMessage")   
  ...
  objEMailMessage.LoadMIME "C:\Temp\Test.mime"
  If objEMailMessage.LastError <> 0 Then
    WScript.Echo "Error: " & objEMailMessage.GetErrorDescription(objEmailMessage.LastError)
  End If  
  ...

SaveMIME function

This function saves a MIME encoded file

Parameters:

  • The filename to save to

Return value:

Always 0.

Example:
  Set objEMailMessage = CreateObject("ActiveEmail.EMailMessage")   
  ...
  objEMailMessage.SaveMIME "C:\Temp\Test.mime"
  If objEMailMessage.LastError <> 0 Then
    WScript.Echo "Error: " & objEMailMessage.GetErrorDescription(objEmailMessage.LastError)
  End If  
  ...

5.4. EMailConstants

In the ActiveEmail, all e-mail constants are grouped together in a separate object called EMailConstants. First create the constants object before you can actually use the constants:

Set objConstants = CreateObject( "ActiveEmail.EMailConstants" )
...
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
...

Priority definitions

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

Encoding definitions

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

SMTP Authentication definitions

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

POP3 Authentication definitions

Constant Value Description
POP3_AUTH_AUTO Auto detect (default)
POP3_AUTH_PLAIN AUTH-PLAIN authentication
POP3_AUTH_APOP APOP authentication

6. Queue server

6.1. Introduction

With ActiveEmail, people usually send SMTP messages directly to an SMTP server. There are two drawbacks of sending directly to the SMTP server:

  • Direct access to the SMTP server is required from the client;
  • Sending e-mails from a client can take some time, depending on the size of the mail, the performance of the SMTP server and the network link.

ActiveEmail can overcome these problems, using a queue mechanism: the client application/script connects to a network share service and drops the e-mail mime information in a file, and the control in the script or application is relinguished immediately.
The ActiveEmail Queue Service picks up the mime information from the network share and sends the e-mail(s) to the smtp server.
To make use of queuing, the should call the Queue function instead of the Send function.
The ActiveEmail Queue Service has enhanced logging capabilities.

The Queue is just a directory. If you use ActiveEmail on one machine only, it can be just a local directory. If you use ActiveEmail on more than one machine, the directory must be a shared directory, somewhere on the network.

You don't need an extra license to use the ActiveEmail Queue Server; licensing is only based on the number of PCs where the ActiveEmail COM component is registered.

The installation of the ActiveEmail Queue Server service creates some subdirectories in the installation directory of ActiveEmail:

  • Log - root directory for all logfiles;
  • Mail\Pickup - clients and webservers store their mimefiles in this location; the ActiveEmail queue Service will pick up these mimefiles and send them out;
  • Mail\Failed - if configured, failed e-mails will be stored here (see also configuration settings);
  • Mail\Sent - if configured, sent e-mails will be stored here (see also configuration settings).

6.2. Hosting the queue

The ActiveEmail Queue Service is not installed by default. To install the ActiveEmail Queue Server service, you must do the following:

  • Open the ActiveEmail folder from the start menu, point to ActiveEmail Queue and launch the Configure ActiveEmail Queue program;
  • Select Select this computer as ActiveEmail Queue Server and click 'Next';
  • Select Allow other network computers to use this ActiveEmail Queue Server. Provide a valid sharename and click 'Next';
  • Click 'Finish' to complete the wizard.

6.3. Connecting from network

Once you have configured one of your network server as 'ActiveEmail Queue Server', you can connect to it from other network computers. These computer must have ActiveEmail installed. To connect to an ActiveEmail Queue Server, you must do the following:

  • Open the ActiveEmail folder from the start menu, point to ActiveEmail Queue and launch the Configure ActiveEmail Queue program;
  • Select Connect to an existing ActiveEmail Queue Server and click 'Next';
  • Enter the shared directory (either in UNC format like '\\Server01\Queue', or by using a mapped drive-letter) and click 'Next';
  • Click 'Finish' to complete the wizard.

6.4. Configuration settings

All configuration settings are made in the HKEY_LOCALMACHINE\Software\ActiveXperts\ActiveEmail key of the registry. Use REGEDT32.EXE to make changes to the registry.

The following settings are defined:

Registry Value Type Explanation
LogDir REG_SZ Directory where logfiles are stored. Emails are only logged if EnableLogging is set to 1 (default).
EnableLogging REG_DWORD Logging is enabled if this value is set to 1 (default). Log files are located in the LogDir directory.
PickupMailDir REG_SZ The 'ActiveEmail Queue Service' can service more than one client. There's one central directory where it can pickup it's e-mails. PickupMailDir points to this directory.
KeepFailedMails REG_DWORD In case of 0, a failed e-mail will be removed from the PickupMailDir directory. In case of 1, a failed e-mail will be moved from the PickupMailDir directory to the FailedMailDir directory.
FailedMailDir REG_SZ A failed e-mail will be moved to this directory, but only if KeepFailedMails is 1.
KeepSentMails REG_DWORD In case of 0, a sent e-mail will be removed from the PickupMailDir directory. In case of 1, a sent e-mail will be moved from the PickupMailDir directory to the SentMailDir directory.
SentMailDir REG_SZ A sent e-mail will be moved to this directory, but only if KeepSentMails is 1.

NOTE: You must restart the ActiveEmail Queue Service after you change the configuration parameters in the registry!

6.5. Errors and warnings

All information about particalr e-mails are logged in the logdirectory (unless logging is disabled). Information about the ActiveEmail Queue Service itself, is logged in the Windows Event Log.
This information can be viewed by using the Event Viewer.
All errors and warnings are logged in the Application Log in the Event Log. So, if the service doesn't start, or e-mails are not logged, check out the Application Log using the Event Viewer.

7. Support

7.1. Product samples

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/.

7.2. ActiveXperts Support

Visit the ActiveXperts Support Site for a complete list of FAQ items at:
    http://www.activexperts.com/support

To contact support, please send an e-mail to: support@activexperts.com

8. Purchase and activation

8.1. Purchase

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

8.2. Product activation

After you purchase the product, you will receive a registration code. This code must be entered in the registry on your machine(s). There are three ways to accomplish this:

Automatic installation

The ActiveEmail Toolkit automatic installation performs all necessary steps to install and register the component. It will ask for the registration code during installation and will enter the registration code in the registry.

'Activate' function

You can use the Activate function of an object.

Set objSmtpServer = CreateObject("ActiveXperts.SmtpServer ")
objSmtpServer.Activate XXXXX-XXXXX-XXXXX", True ' Substitute XXXXX-XXXXX-XXXXX by your own registration code
                     ' Pass True to make the activation persistent, so you need to
                     ' call Activate  only once. If you pass False, you need to call Activate
                     ' each time the product is started.

The Activate function of any of the objects writes the following entry to the registry, which will actually activate the product:

Key: HKEY_LOCAL_MACHINE\Software\ActiveXperts\ActiveEmail Toolkit\RegistrationKey  Type: REG_SZ  Value: XXXXX-XXXXX-XXXXX

where 'XXXXX-XXXXX-XXXXX' is the registration code issued to you.

3. Manually insert code in the registry

You can activate the product by editing the registry manually:

  • Start the registry editor (either REGEDT32.EXE or REGEDIT.EXE);
  • Open the 'HKEY_LOCAL_MACHINE\Software\ActiveXperts\ActiveEmail Toolkit' key;
  • Add/modify the 'RegistrationKey' value: Type: REG_SZ, Value: XXXXX-XXXXX-XXXXX

Distribution License

For information about how to use the registration code with a Distribution License, please read the following document: How to distribute an ActiveXperts Toolkit.

9. Appendix A - License agreement

9.1. Licence agreement

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 "ActiveEmail" 
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