?
Solved

Sending email from Windows server 2003

Posted on 2004-04-10
8
Medium Priority
?
853 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

771 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