469,903 Members | 1,921 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,903 developers. It's quick & easy.

CDO email in Windows 2003

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 = "me@me.com"
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??

Jul 22 '05 #1
12 5182
<pi***@smorley.co.uk> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
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 = "me@me.com"
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?
Jul 22 '05 #2
'course it aint! it's mail.whatever.co.uk I checked it with my
service provider.

Jul 22 '05 #3

pi***@smorley.co.uk wrote:
'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?

Jul 22 '05 #4
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"

Jul 22 '05 #5

http://www.powerasp.com/content/new/...ail_cdosys.asp

<pi***@smorley.co.uk> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
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 = "me@me.com"
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??

Jul 22 '05 #6
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!

Jul 22 '05 #7
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 = "go***************@goodairfieldguide.co.uk"
objMessage.To = "di**************@hostway.co.uk" 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?

Jul 22 '05 #8
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?

--
Mark Schupp

<pi***@smorley.co.uk> wrote in message
news:11********************@g44g2000cwa.googlegrou ps.com...
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 = "go***************@goodairfieldguide.co.uk"
objMessage.To = "di**************@hostway.co.uk" 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?

Jul 22 '05 #9
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!!!!!

Jul 22 '05 #10
On 24 May 2005 05:02:56 -0700, pi***@smorley.co.uk wrote:
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
Jul 22 '05 #11
"Jeff Cochran" wrote:
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.


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

"CDO for Microsoft® Windows® 2000 (CDOSYS), which implements
the 2.0 version of the Collaboration Data Objects API
specification, is a Component Object Model (COM) component
designed to simplify writing programs that create or
manipulate Internet messages. CDOSYS is one in a suite of
collaborative COM components referred to collectively as CDO.

CDOSYS is implemented in CDOSYS.DLL.

CDOSYS was first available in Windows 2000 Server. As of
December 2003, CDOSYS is an integral part of the Windows
2000, Windows XP, and Windows 2003 series of operating
systems."

http://msdn.microsoft.com/library/en...cdowin2000.asp
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 22 '05 #12
On Tue, 24 May 2005 18:19:45 -0500, "Dave Anderson"
<GT**********@spammotel.com> wrote:
"Jeff Cochran" wrote:
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.


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
Jul 22 '05 #13

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by mike | last post: by
5 posts views Thread by John | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.