Install CDONTS Mail component and SMTP on Windows Server 2008

Source: Internet
Author: User
Tags contact form

Original address: http://www.jppinto.com/2009/03/install-cdonts-mail-component-and-smtp-on-windows-server-2008/

CDONTS is mail component used to send messages from an ASP page. Instead of recoding Multiple Web sites I had created, I am just going to install the component on my Windows Server 2008.

Configuration Information

Platform: Hyper V Host (http://www.microsoft.com/windowsserver2008/en/us/hyperv.aspx)
OS: Windows Server 2008
installation Media: Cdonts.zip–you can download the version I used here.
CPU: 2 Dedicated 2.0Ghz
RAM: 1024mb
Disk: 40GB
Notes: IIS 7 has already been installed

Background

You can see here my sendmail.asp are calling CDONTS when it creates the message.

If CDONTS is not installed and I press send in my mail form I get this error

Installing CDONTS

Copy CDONTS.dll to c:\windows\system32 (your can download the version I used here)

Open the command prompt and run "regsvr32 c:\windows\system32\cdonts.dll"

Press OK when registration succeeds

Installing SMTP

Open Server Manager, you can open this several different ways in Windows Server 2008. Probably the quickest-to-open Server Manager is-to-right click "My Computer" and choose "Manage", another-by IS open ' Control Panel ' go to ' program and Features ' and select ' Turn Windows Features on or off '. A third-to-open it is "Server Manager" option under Administrative Tools.

Under Features, select Add Roles

Check the check box off next to "SMTP Server"

IIS would figure out what else it needs and create a list of required features, press "ADD required features"

Now there should is a check in the check box next to "SMTP Server", press "next" to continue

Press "Install" to continue with the installation

You should see a message indicating the installation have succeeded, press "Close" to continue

Configure SMTP Server

Make sure when you install the SMTP service, you enable Relay for localhost. Go to Administrative Tools > Internet information Services (IIS6) > SMTP Virtual Server > right click, Properties > Access Tab > Relay button > Add 127.0.0.1 in the option

Configure SMTP Security

Grant the appropriate permissions on C:\inetpub\mailroot\pickup (I granted USERS group Modify permissions). You could get permission denied if the folder security isn ' t adjusted.

Testing

This is my contact form, that uses the CDONTS component

No more error, the message is sent out successfully

You can also test using the using the-the following code in an ASP page. Here's the code to test CDONTS on an ASP page.

Create a TEST. ASP with the following code and put the file in C:\Inetpub\wwwroot. Change the ' cdontsmail.to= ' value to your e-mail address. Navigate to http://localhost/test.asp, if are configured OK then you should receive the mail message. If you do not receive the e-mail check the folders under C:\inetpub\mailroot to see if it queued up.

<%

Dim strbody
Dim Cdontsmail
Set Cdontsmail = CreateObject ("CDONTS. NewMail ")
cdontsmail.from= "[Email protected]"
cdontsmail.to= "[Email protected]"
Cdontsmail.subject= "This is a Test email"
Strbody = "This is a test message." & VbCrLf
Cdontsmail.body= strbody
Cdontsmail.send
Set cdontsmail=nothing

%>

Install CDONTS Mail component and SMTP on Windows Server 2008

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.