Solved

Error using CDO with Plesk

Posted on 2008-09-30
1
651 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Load data upon clicking a button 8 48
Asp in server side with Mssql Server 7 4 34
ASP exit 10 28
Update the value of table B with value of table A tables inner join 6 78
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…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

730 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