Back to product page

Getting started in ASP


Working with the COM object and ActiveX control

Remarks

Working with the COM object

In order to insert wodSmtp COM object in your project, follow these steps:

1. Install the component on your system by starting its setup program.

2. Go to Inetpub/wwwroot folder and create new, or open existing ASP page

3. Add code similar to this initialize wodSmtpCom
 
<%
dim Smtp1
set Smtp1 = Server.CreateObject("WeOnlyDo.wodSmtpCom.1")
 

4. Set Blocking mode which is needed in scripting environments
 
Smtp1.Blocking = 1
 

5. If you have licensed version of the product, set LicenseKey property
 
Smtp1.LicenseKey = "xxxx...xxxx"
 

6. Set other properties, and connect
 
Smtp1.SendTextHtmlAttachment "john@doe.com", "general@weonlydo.com", "This is a test", "Hi there!", "Hi There!", "c:\myattachment.zip"
...
%>
 

7. If an error occurs, you should convert hexadecimal representation of the error to decimal so that you can locate error in our list. For example:
 
Error Type:
WeOnlyDo.wodSmtpCom.1 (0x800A9C3F)
License key missing. You can not use this component in design environment.
/smtp.asp, line 9
 

IIS reported error 0x800A9C3F. You should use only 9C3F, when converted to decimal it is 39999 - License Key missing error.

7. Important: If you use trial version of our product, you will always receive above error. wodSmtp needs to access the registry in order to validate trial license. Since IIS is running under IUSR_COMPUTER account and does not have access to the registry, you must change IIS privileges and force it to run as Administrator.

Do not do this on production server! This is potential security problem! This applies only to trial (demo) version. Licensed version does not have this restriction.

To change IIS privileges go to Start->Settings->Control Panel->Administrative Tools->Internet Services Manager. Find 'Default Web Site' here, right-click on it, select 'Properties'. Go to 'Directory Security' tab, at the top there is 'Anonymous access and authentication control' frame, and 'Edit' button. Click on 'Edit' button, and then on new 'Authentication Methods' dialog box select also 'Edit' button for 'Account used for anonymous access'.

Here you should enter Username: 'Administrator', and for Password: put administrator password. Click on 'Ok' to close all windows, and wodSmtp should run now

Once again: do not do this on production server, only in testing and firewalled environment.


Working with the ActiveX control

You should not use ActiveX control in ASP because you will not be able to set LicenseKey. Only COM object should be used with ASP.

Platforms

Windows