Ive tried all these techniques...
What would make the above code work on one server, but not another ?
Main Topics
Browse All TopicsHi. I've just moved a website from a W2K Adv Server to windows 2003 Server, and I cant get emails to send.
I was using CDONTS, but thats obsolete now in 2003, so I am trying CDO.Message now.
Here is my code:
Dim myMail
Set myMail=CreateObject("CDO.M
myMail.Subject = MailSubject
myMail.From = MailTo
myMail.To = MailTo
myMail.HTMLBody = MailBody
myMail.Send
set myMail=nothing
The error I'm getting is this:
CDO.Message.1 error '80040220'
The "SendUsing" configuration value is invalid.
(it crashes on the "myMail.Send" line)
Please dont suggest using the "microsoft\schemas" stuff, because I have tried that already, and I am working on another 2003 server (on another network) that uses the exact code above with no problems at all.
What could be causing this error? Is it a setting on IIS or the O/S? or do I need to adjust the firewall??
Thanks.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Here's a test that works on Win 2000... Not sure if it helps in your case, but worth checking out:
http://support.microsoft.c
Try adding your smtp server info:
Set myMail = Server.CreateObject("CDO.M
Set myMailConfig = Server.CreateObject ("CDO.Configuration")
myMailConfig.Fields("http:
myMailConfig.Fields("http:
myMailConfig.Fields("http:
myMailConfig.Fields("http:
myMailConfig.Fields.Update
Set myMail.Configuration = myMailConfig
myMail.From = MailFrom
myMail.To = MailTo
myMail.Subject = MailSubject
myMail.HTMLBody = MailBody
myMail.Send
Set myMail = Nothing
Set myMailConfig = Nothing
Hi,
If you go to:
http://www.hotcakes.co.nz and download the latest version of hotcakescms, I'm sure this has how to do this exact thing in the contact.asp file under httpdocs. You'll see how its done there and because that program is open source you could probably use the contact.asp with a few mods as a standalone script to send email. If you're distributing your application I suggest using some sort of backwards compatbility.
If thats the case, I may need need to wait until the weekend to look at it (I am on a contract Mon-Fri - really frustrating!!!! as I am the only one able to do it).
But does it actually 'need' configuring? With win2000 it just works without the need to set it up.
I have read the IIS6 is installed in a lockdown state, where everything is switched off by default. I have looked at a win2003 machine here (where I am contracting) and I cant imageing what I would need to configure? unless it is the granting of access to localhost.
Any ideas? Is localhost denied access initially at the time of installation?
You can always specify an SMTP server other than localhost. If your server requires authentication, you'll need to add the lines:
myMailConfig.Fields("http:
myMailConfig.Fields("http:
myMailConfig.Fields("http:
I am back in the office now an can finally sit in front of the server for the first time since the problem.
Looking at IIS, there isnt even an SMTP 'folder' in the left-hand pane. I have only:
-Application Pools
-Web sites
-Web service extensions
Under "Add remoove Windows components", it says that SMTP is installed with IIS - so where is it?
Aliso increased points to 500!
Hi,
The reason you are not seeing "SMTP" is that you need to go to Control Panel>>Add or Remove Programs. When the new "Add or Remove Programs" screen comes up click on the "Add/Remove Windows Components" on the left hand side. Run through the Wizard to install IIS with SMTP.
This is done by clicking on "Application Server" and the details button.This will bring up another window, where IIS is displayed. Click on "Internet Information Server (IIS)" and click details button. This will bring up options including SMTP. Click on SMTP and then click OK. Click OK again and then continue installation.
Hope this is of help
Thanks
Ben
Thanks. I had to split the points:
- WMIF first mentioned whether SMTPwas installed
- benfellows helped last night when I needed to install it.
Thanks to everyone else.
Just a note though to be aware of I did actuall check twice to see if SMTP was installed and both times the SMTP checkbox WAS ticked - definitley. I dont know if this is a Windows components bug or just my server? but I am not mistaken - It was definitly ticked. The first tme I checked was over the phone, giving instructions to my colleage who read out what was ticked. (see my last post: 11/25/2005 08:38PM GMT)
Thanks benfellows, I have done this a few times before, but I wasnt sure with win2003 as the "Windows components" has an "Email Services" component which includes SMTP - so I wasnt sure if I needed that or not. After your instruction the SMTP tickbox was NOT ticked!?!?!
Business Accounts
Answer for Membership
by: SquareHeadPosted on 2005-11-22 at 07:43:03ID: 15342645
Pretty good tutorial here:
m/WSH/cdo. htm
http://www.paulsadowski.co