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
Solved

Error using CDO with Plesk

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

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 …
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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

791 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