This document contains information concerning the Dundas Mailer control and demos .  There is a Requirements section which is then followed by a brief summary of each control.  This is followed  by a description of the four (4) sample applications.  Instructions are also provided for setting up and configuring the demos, and in addition there is a troubleshooting section for your convenience.

NOTE: to find out how to delete files uploaded by users (which occurs with two of the sample applications) click here.  

Dundas Mailer Control 1.0.

Overview of the Four ASP Demos.

Installation Notes.

Troubleshooting.


Requirements

In order to run the demos one of the following sets of conditions must be met:


Dundas Mailer Control 1.0

The Dundas Mailer control (DSMailer.dll) is a free commercial email control which utilizes the SMTP, MIME and NNTP protocols to send email messages and post news articles. It has been designed for use within Active Server Pages (ASP) and can be used by any person or organization that is hosting web sites using Microsoft's Internet Information Server. It is also used in conjunction with the Dundas Upload Control when dealing with uploaded files to be sent either as attachments or embedded html objects.

To download the free Dundas Upload control click here.


Overview of the ASP Sample Applications

Note: All of our samples utilize an Error.asp page.  If an error occurs or a method call is not successful then the user will be re-directed to this error page and the appropriate error message will be displayed.

The Links.htm page provides you with links to all four of the demo applications.

1) AutoResponse Demo

This demo consists of one self-posting file named "AutoResponse.asp".  In this scenario a user has forgotten their password and needs to retrieve it.  They enter their first name, last name, email address and they can optionally specify an SMTP server to increase the speed and efficiency of the operation.  When they submit this information the Mailer control is used to send them their fictitious username/password combination.

AutoResponse utilizes the Dundas Mailer control.


2) Sending an Email with an Attachment

This demo lets a user send an email to a specified address along with an optional file attachment.

The page which gathers the user's data is named "SendMail.asp".  It utilizes an html form (the EncType attribute being set to "Multipart/Form-Data") and POSTS to another ASP page called "SendMail_Process.asp".  This page is responsible for retrieving the form data, setting the various email headers, processing the uploaded file (if any) and sending the email.  If the mail sending operation is successful the user is redirected back to the main page and a success message is displayed.  If the operation fails the user is redirected to the Error.asp page.

Both the Upload and Mailer controls are used.


3) Sending an Html Email with Embedded Objects

This sample allows a user to send an html-based email along with two optional embedded objects.

The page which gathers the users data is named "SendHtmlEmail".  It utilizes an html form which POSTS to another page called "SendHtmlEmail_Process".  This page sets the email headers, processes any uploaded files, handles the embedding of the html objects and then send the email to the specified recipient.  If the mail sending operation is successful the user is redirected back to the main page and a success message is displayed.  If the operation fails the user is redirected to the Error.asp page.

Both the Upload and Mailer controls are used for this sample.    


4) Posting an Article to a News Group

This sample lets a user post an article to a news group.  The article can either be posted to the root of the news group directory or underneath an existing article as a response.

The page which gathers the users data is named PostArticle.asp.  It POSTS to another page called "PostArticle_Process.asp".  This page sets the article headers and then sends the article to the specified news group (by default we use "msnews.microsoft.com" as the server along with "microsoft.a.test" as the default news group).  If the article is successfully posted the user is redirected back to the main page and a success message is displayed.  If the operation fails the user is redirected to the Error.asp page.

This sample utilizes the Mailer control only.


Installation Notes

The windows account under which the install runs needs to have administrative priviledges for a successful installation. 

Please note that the Dundas Upload Control 2.0 is required for the "html email" and "email with an attachment" sample applications.  To download the free Dundas Upload control click here.

The following files will be copied to the selected installation directory:

Start menu entries are as follows:


Hosting the Demos

In order to host these demos you need to be using MS Internet Information Server (IIS) along with either Windows 2000 or Windows NT.  The samples have not been tested for use with Microsoft's Personal Web Server.  Also, in order to set up NTFS permissions the drive in question must be utilizing an NTFS FAT.

    To run these samples:
  1. If you have installed to a directory which is not a web directory or subdirectory then you must create an alias to view/run the ASP pages.  To do this right click (using Windows Explorer) on the directory where the ASP pages are located (the Samples directory) and then select "Properties". Choose the Web Sharing tab folder and select "Share this Folder". Choose an alias for the installation directory and make sure that "Read" and "Scripts" are selected in the Edit Alias window.  When you view the samples the URL in your browser will be "http://localhost/Alias/ADemo.asp".
       
  2. Use Windows Explorer to set up the  appropriate NTFS permissions for the default web account (usually the IUSR account).  To set NTFS permissions right click on the directory in question and select the "Properties | Security " property page.  Then click on the Permissions button.

    The default web account will need Full Control permissioms for the dlls (DSUpload.dll and DSMailer.dll) as well Read permission for the ASP pages in the installation directory.

    If you have installed to a web site directory then just reapply permissions.  
  3. Make sure that the Web permissions which are set via the Microsoft Management Console (Internet Service Manager) are set to Read and Script Execute.  Note that if you created an alias (Step#1) then the Web permissions will already have been set.
  4. Run the samples from your browser, making sure that IIS is running.  You may have to reboot your machine because of changed permissions.


How to Delete Files Uploaded by the User

A folder with the name "4AA80F25-21E4-11D4-9985-0050BAD44BCD" will be created at the root of your c:\ drive for the "Sending an Html Email with Embedded Objects" and "Sending an Email with an Attachment" demos when either of these samples are run for the first time.  This directory is used to store files uploaded by the user.  If you want to delete these files you will need to do the following two things:


Trouble Shooting

Note: most methods of the Mailer and Upload control will throw an exception if unsuccessful.  It can be very helpful to "rem" out any "On Error Resume Next" statements and then observe any resulting exceptions for an indication of the nature of the error that is occurring.
The uninstall does not remove the DSMailer.dll

The inetinfo.exe process may be referencing the dll during the uninstall process.  Reboot your computer and remove the dlls manually.
 

Server.CreateObject failed.  Invalid class string specified

The specified ProgID of either the Mailer or Upload control is incorrect.  The ProgID of the Mailer control is "Dundas.Mailer", and the ProgID of the Upload control (2.0) is "Dundas.Upload[.2]".  

This can also be caused by a control which is not registered.  Register the control in question by using regsvr32.exe.

HTTP Error 403 Forbidden: Execute Access Forbidden
 
You have not set up the permissions for your ASP files correctly. Use Windows Explorer to set up proper NTFS directory permissions if you are running Win NT or Win 2000 (Read access is required), and also make sure that the Web permissions set in MMC (Microsoft Management Console) are at least Read with Script Execute rights.  Also make sure that the Samples/Images folder has Read permissions as well.

HTTP Error 404 File Not Found
 
The URL you are specifying in your browser is incorrect.  Determine where your ASP pages are and enter the appropriate URL (e.g. http://127.0.0.1/RelativePathFromRootWebDirectory/PostArticle.ASP).


Access is Denied

The appropriate permissions have not been set up for the deletion of files or folders.  You need to either give the default web account (usually IUSR_MACHINENAME) Full Control NTFS permission for the folder in question or you can use the ImpersonateUser method of the Upload control to utilize a user account which does have the right to delete files/folders.  


VBSCript RunTime Error "800a01ad" ActiveX component can not create object

Either the DSUpload.dll or DSMailer.dll does not have the appropriate permissions.  Make sure that the default web account has Full Control rights for both dll's.


Error "800a001e" A required priviledge is not held by the client

This is probably caused by calling the ImpersonateUser method of the Upload control in conjunction with the "Run in Separate Memory Space" box being checked in your Home Directories property page (found in the Microsoft Management Console, or MMC).  To get around this you can either grant the default web account "Act as Part of the Operating System" priviledges or alternatively you can just turn off the "Run in Separate Memory Space" option.  Refer to either the MSDN or the Free Programs Documentation (examine the ImpersonateUser topic) for details on how to grant operating system priviledges.