Error using CDO with Plesk

Posted on 2008-09-30
Last Modified: 2008-09-30
Hi -

I have some script in Classic ASP to send confirmation e-mails from a web page using CDO.  The script works fine when testing using recipient addresses on the same domain as the SMTP server domain, but when sending to "outside" addresses, I get the generic 500 error.  Has anyone run into this before?  I'm using Win2008/IIS7 and the latest version of Plesk.  My Classic ASP code appears below.



Set cdoConfig = CreateObject("CDO.Configuration")

 	Const cdoSendUsingMethod = ""

	Const cdoSMTPServer = ""

		With cdoConfig.Fields  

			.Item(cdoSendUsingMethod) = 2 'cdoSendUsingPort  

			.Item(cdoSMTPServer) = ""  


	End With  

	Set cdoMessage = CreateObject("CDO.Message")  


	With cdoMessage  

			Set .Configuration = cdoConfig  

			.From = strMailFrom

			.To = strMailTo

			If strMailCC <> "" Then

				.Cc = strMailCC

			End If

			If strMailBCC <> "" Then

				.Bcc = strMailBCC

			End If

			.Subject = strMailSubject

			.HTMLBody = strMailBody


	End With  


	Set cdoMessage = Nothing  

	Set cdoConfig = Nothing

Open in new window

Question by:okanagan
1 Comment

Accepted Solution

okanagan earned 0 total points
ID: 22610969
Changed the mail host to "localhost" and that seemed to clear it up.

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: and…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now