Solved

Error using CDO with Plesk

Posted on 2008-09-30
1
652 Views
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.

Thanks,

Rod

Set cdoConfig = CreateObject("CDO.Configuration")
 	Const cdoSendUsingMethod = "http://schemas.microsoft.com/cdo/configuration/sendusing"
	Const cdoSMTPServer = "http://schemas.microsoft.com/cdo/configuration/smtpserver"
		With cdoConfig.Fields  
			.Item(cdoSendUsingMethod) = 2 'cdoSendUsingPort  
			.Item(cdoSMTPServer) = "mail.mhopus.org"  
			.Update  
	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
			.Send  
	End With  
	
	Set cdoMessage = Nothing  
	Set cdoConfig = Nothing

Open in new window

0
Comment
Question by:okanagan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

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

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
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…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

724 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