[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Sending email from Windows server 2003

Posted on 2004-04-10
8
Medium Priority
?
854 Views
Last Modified: 2012-06-27
Hello experts

I need to be able to send mail from an ASP page that's hosted on a Windows Server 2003 (Standard edition) server.

The code used to work fine on Windows 2000 server.

The SMTP server is installed and I can telnet to it on port 25.

I get the following error:

---------------------------------------------------------------------------------
Server object error 'ASP 0177 : 800401f3'

Server.CreateObject Failed

mailer.asp, line 13

800401f3
---------------------------------------------------------------------------------

I have tried both:

     Dim objMail
     Set objMail = Server.CreateObject("CDONTS.NewMail")

---- AND ----

     Dim objMail
     Set objMail = Server.CreateObject("CDO.Message")

no joy. What am I doing wrong?


Thanks for your help

- Hans
0
Comment
Question by:hans_larson
[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
8 Comments
 
LVL 21

Expert Comment

by:ap_sajith
ID: 10796316
You do not have either of the two components installed on the server. Check up with your sys admin / Hosting provider whether the components are available for use (In other words check if the components are installed on the server).

Cheers!!
0
 
LVL 3

Author Comment

by:hans_larson
ID: 10796373
ap_sajith,

The components were installed.

It appears that you have to create the ("CDO.Configuration") object first before you can create the ("CDO.Message") object.

Here is the solution:

Put the following code into a new asp page:

---------------------------------------------------------------------

<%
    sch = "http://schemas.microsoft.com/cdo/configuration/
    Set cdoConfig = Server.CreateObject("CDO.Configuration")
    cdoConfig.Fields.Item(sch & "sendusing") = 2
    cdoConfig.Fields.Item(sch & "smtpserver") = "192.168.0.1"
    cdoConfig.fields.update
 
    Set cdoMessage = Server.CreateObject("CDO.Message")
    Set cdoMessage.Configuration = cdoConfig
    cdoMessage.From = "from@me.com"
    cdoMessage.To = "to@me.com"
    cdoMessage.Subject = "Sample CDONTS NewMail"
    cdoMessage.TextBody = "This is a test for CDONTS message"
    cdoMessage.Send
    Set cdoMessage = Nothing
    Set cdoConfig = Nothing
%>


---------------------------------------------------------------------------------


Also be sure the allowing relaying on your SMTP server properties.
0
 
LVL 1

Expert Comment

by:icx
ID: 10797049
I agree.

Hans_Larson's comment should work fine. There's more on this over at Microsoft's KB. This article might help you, or at least point you in a useful direction: http://support.microsoft.com/default.aspx?scid=kb;en-us;315197.

Hope this helps.

Cheers.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 10

Expert Comment

by:MasseyM
ID: 10797541
You basicalyl dont have CDO installed.  Go to the site below, download this ASP code and it willscan the server for ALL components installed.  Fnd and choose which mail app you prefer and use that to send your mail:

http://www.bier-voting.de/objcheck/
0
 
LVL 10

Expert Comment

by:MasseyM
ID: 10798162
Why was the request made??  These are all good answers.
0
 
LVL 3

Author Comment

by:hans_larson
ID: 10799744
MasseyM,

Notice the second and correct answer was made by myself.
0
 
LVL 1

Accepted Solution

by:
GhostMod earned 0 total points
ID: 10823964
PAQd, 50 points refunded.

GhostMod
Community Support Moderator
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
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/…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

656 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