Solved

Error using CDO with Plesk

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…
A simple description of email encryption using a secure portal service. This is one of the choices offered by The Email Laundry for email encryption. The other choices are pdf encryption which creates an encrypted pdf of your email and any attachmen…

911 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

22 Experts available now in Live!

Get 1:1 Help Now