CDO email in Windows 2003

P

pilot

I am having trouble sending a form email on a remote W 2003 server.

The test script I am using is as follows
<%@ Language=VBScript %>
<% Set objMessage = CreateObject("CDO.Message")
objMessage.From = "me"
objMessage.Subject = "test"
objMessage.To = "(e-mail address removed)"
objMessage.TextBody = "testing"
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing")
= 2
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")
= "mySMTPserver"
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport")
= 25
objMessage.Configuration.Fields.Update
objMessage.Send
%>

I have been on this all morning and i'm well fed up.

Is there something staring me in the face??
 
M

McKirahan

I am having trouble sending a form email on a remote W 2003 server.

The test script I am using is as follows
<%@ Language=VBScript %>
<% Set objMessage = CreateObject("CDO.Message")
objMessage.From = "me"
objMessage.Subject = "test"
objMessage.To = "(e-mail address removed)"
objMessage.TextBody = "testing"
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/confi
guration/sendusing")
= 2
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/confi
guration/smtpserver")
= "mySMTPserver"
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/confi
guration/smtpserverport")
= 25
objMessage.Configuration.Fields.Update
objMessage.Send
%>

I have been on this all morning and i'm well fed up.

Is there something staring me in the face??

Is "mySMTPserver" actually the name of your SMTP server?
 
P

Paxton

'course it aint! it's mail.whatever.co.uk I checked it with my
service provider.

When you say you can't get it to work properly, what happens? What
error messages do you get?
 
P

pilot

On my service provider, I merely get the "computer says no" message -
ie This page cannot be displayed - no explanation.

However, when I try it on my IIS server on my PC where I test sites, I
get the following:-
Error Type:
(0x8004020E)
Cannot modify or delete an object that was added using the COM+ Admin
SDK
/mepdynamic/test.asp, line 11

Line 11 being "objMessage.Send"
 
P

pilot

Kyle. Thanks. I have emailed the service provider to find out if they
require outgoing authentication. What a pain. I am developing this
for a client and all the passwords, SMTP settings etc will have to be
changed once it goes up on their site.

Grrrrr!
 
P

pilot

Well it turns out that CDO is hugely variable!

My service providers have provided me with a CDO script that works as
follows:-

<%

Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Example CDO Message"
objMessage.Sender = "(e-mail address removed)"
objMessage.To = "(e-mail address removed)" objMessage.TextBody =
"This is some sample message text."

'==This section provides the configuration information for the remote
SMTP server. '==Normally you will only change the server name or IP.

objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

'Name or IP of Remote SMTP Server objMessage.Configuration.Fields.Item
_
("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"localhost"

'Server port (typically 25) objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25

objMessage.Configuration.Fields.Update

'==End remote SMTP server configuration section==

objMessage.Send

%>

You will see that the remote config is set to "localhost" - this can
also be the URL.

BUT. you need a working email address at objMessage.sender in order
for it to work.

Why are there so many different ways none of which work on my server?

Microsoft, are you not supposed to make things easier?

Anyway, I still can't get it to work with my form emailer script. Has
anyine got one that works with CDO?
 
M

Mark Schupp

I just had to deal with CDO on XP and 2003 because increased security
stopped the way I was using it from working. However, I've come in the
middle of this thread and don't know what your original problem was. What
error messages are you getting?
 
P

pilot

It's sorted now as far as the CDO part is concerned but I am still
having problems merging it with a form emailer script.

My service providers are being very helpful as I don't get a detailed
error message from the remote server and I cannot test it on mine as
all te settings are different for a local server.

This makes testing scripts very difficult and time consuming for
everyone.

I really think a company as big as Microsoft could come up with a CDO
mailer which would work the same on different computers using the same
platform.

GRRRR!!!!!
 
J

Jeff Cochran

It's sorted now as far as the CDO part is concerned but I am still
having problems merging it with a form emailer script.

My service providers are being very helpful as I don't get a detailed
error message from the remote server and I cannot test it on mine as
all te settings are different for a local server.

This makes testing scripts very difficult and time consuming for
everyone.

I really think a company as big as Microsoft could come up with a CDO
mailer which would work the same on different computers using the same
platform.

They have. Except CDO isn't a "mailer" and isn't supported by default
on Server 2003. It's deprecated and you should be using CDOSYS
instead. Maybe if you described the problems you are having with
"merging it with a form emailer script" we could suggest options.

Most service providers have their own mail software options as well,
have you checked with yours?

Jeff
 
J

Jeff Cochran

News to me. And to Microsoft. CDO and CDOSYS are one and the same:

Bleh! Gotta stop posting without a proper night's rest. Third post I
responded to, first two were CDONTS related and I guess I went into
autopilot.

Of course you're correct. Change CDO to CDONTS in my response and
it's correct, though useless in this case.

Feel free to pummel me at will...

Jeff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,007
Latest member
obedient dusk

Latest Threads

Top