Solved

Error using CDO with Plesk

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

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: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
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