Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: CDONTS


Message #1 by "Chris Thompson" <cthompson@n...> on Mon, 11 Nov 2002 11:45:05 -0700
I have this code and It is taken and modified a bit, but it will not
work on my windows 2000 server.  Any ideas what I am missing?

Dim objNewMail
Set objNewMail =3D Server.CreateObject("CDONTS.NewMail")
objNewMail.From =3D "cthompson@n..."
objNewMail.To =3D "cthompson@n..."
objNewMail.Subject =3D "Test results"
objNewMail.Body =3D "This is a sample message."
objNewMail.Send
Set objNewMail =3D Nothing


Thanks,

Chris Thompson

-+-+-+-+-+-+-+-+-+-+-+-
cthompson@n...
xxx-xxx-xxxx
-+-+-+-+-+-+-+-+-+-+-+-
Message #2 by "Johnson, Israel" <IJohnson@R...> on Mon, 11 Nov 2002 13:57:18 -0500
CDONTS, I believe is for running an NT Server.  If you are running a 2000
server, try a CDO for 2000 Object.... Perhaps, the Message object.

-----Original Message-----
From: Chris Thompson [mailto:cthompson@n...] 
Sent: Monday, November 11, 2002 1:45 PM
To: ASP Web HowTo
Subject: [asp_web_howto] CDONTS

I have this code and It is taken and modified a bit, but it will not
work on my windows 2000 server.  Any ideas what I am missing?

Dim objNewMail
Set objNewMail = Server.CreateObject("CDONTS.NewMail") 
objNewMail.From = "cthompson@n..." 
objNewMail.To = "cthompson@n..." 
objNewMail.Subject = "Test results" 
objNewMail.Body = "This is a sample message." 
objNewMail.Send 
Set objNewMail = Nothing


Thanks,
 
Chris Thompson
 
-+-+-+-+-+-+-+-+-+-+-+-
cthompson@n...
xxx-xxx-xxxx
-+-+-+-+-+-+-+-+-+-+-+-

Message #3 by "Johnson, Israel" <IJohnson@R...> on Mon, 11 Nov 2002 14:03:21 -0500
See:  www.asp101.com/articles/john/cdosmtprelay/default.asp


-----Original Message-----
From: Johnson, Israel [mailto:IJohnson@R...] 
Sent: Monday, November 11, 2002 1:57 PM
To: ASP Web HowTo
Subject: [asp_web_howto] RE: CDONTS

CDONTS, I believe is for running an NT Server.  If you are running a 2000
server, try a CDO for 2000 Object.... Perhaps, the Message object.

-----Original Message-----
From: Chris Thompson [mailto:cthompson@n...] 
Sent: Monday, November 11, 2002 1:45 PM
To: ASP Web HowTo
Subject: [asp_web_howto] CDONTS

I have this code and It is taken and modified a bit, but it will not
work on my windows 2000 server.  Any ideas what I am missing?

Dim objNewMail
Set objNewMail = Server.CreateObject("CDONTS.NewMail") 
objNewMail.From = "cthompson@n..." 
objNewMail.To = "cthompson@n..." 
objNewMail.Subject = "Test results" 
objNewMail.Body = "This is a sample message." 
objNewMail.Send 
Set objNewMail = Nothing


Thanks,
 
Chris Thompson
 
-+-+-+-+-+-+-+-+-+-+-+-
cthompson@n...
xxx-xxx-xxxx
-+-+-+-+-+-+-+-+-+-+-+-


Message #4 by Mark Eckeard <meckeard2000@y...> on Mon, 11 Nov 2002 11:03:43 -0800 (PST)
Chris,

Are you getting any errors when you run this code?  If
so, please post them.

Mark
--- Chris Thompson <cthompson@n...> wrote:
> I have this code and It is taken and modified a bit,
> but it will not
> work on my windows 2000 server.  Any ideas what I am
> missing?
> 
> Dim objNewMail
> Set objNewMail 
> Server.CreateObject("CDONTS.NewMail") 
> objNewMail.From = "cthompson@n..." 
> objNewMail.To = "cthompson@n..." 
> objNewMail.Subject = "Test results" 
> objNewMail.Body = "This is a sample message." 
> objNewMail.Send 
> Set objNewMail = Nothing
> 
> 
> Thanks,
>  
> Chris Thompson
>  
> -+-+-+-+-+-+-+-+-+-+-+-
> cthompson@n...
> xxx-xxx-xxxx
> -+-+-+-+-+-+-+-+-+-+-+-
> 


__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2
Message #5 by Mark Eckeard <meckeard2000@y...> on Mon, 11 Nov 2002 11:06:38 -0800 (PST)
CDONTS should work on Windows 2000.

Here is an article that might help:

http://aspfree.com/aspnet/setupcdonts.aspx

Mark
--- "Johnson, Israel" <IJohnson@R...> wrote:
> CDONTS, I believe is for running an NT Server.  If
> you are running a 2000
> server, try a CDO for 2000 Object.... Perhaps, the
> Message object.
> 
> -----Original Message-----
> From: Chris Thompson [mailto:cthompson@n...] 
> Sent: Monday, November 11, 2002 1:45 PM
> To: ASP Web HowTo
> Subject: [asp_web_howto] CDONTS
> 
> I have this code and It is taken and modified a bit,
> but it will not
> work on my windows 2000 server.  Any ideas what I am
> missing?
> 
> Dim objNewMail
> Set objNewMail 
> Server.CreateObject("CDONTS.NewMail") 
> objNewMail.From = "cthompson@n..." 
> objNewMail.To = "cthompson@n..." 
> objNewMail.Subject = "Test results" 
> objNewMail.Body = "This is a sample message." 
> objNewMail.Send 
> Set objNewMail = Nothing
> 
> 
> Thanks,
>  
> Chris Thompson
>  
> -+-+-+-+-+-+-+-+-+-+-+-
> cthompson@n...
> xxx-xxx-xxxx
> -+-+-+-+-+-+-+-+-+-+-+-
> 
> 


__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2
Message #6 by "Chris Thompson" <cthompson@n...> on Mon, 11 Nov 2002 13:36:22 -0700
I did originally have it like this:

Dim objNewMail
Set objNewMail =3D Server.CreateObject("cdo.Message")
objNewMail.From =3D "cthompson@n..."
objNewMail.To =3D "cthompson@n..."
objNewMail.Subject =3D "HazMat test results"
objNewMail.HTMLbody =3D "This is a sample message."
objNewMail.Send
Set objNewMail =3D Nothing

Both sets of code gave no errors and returned no email.  The addresses
are correct.  The OS on the machine is Windows 2000 Server Edition


Thanks,

Chris Thompson

-+-+-+-+-+-+-+-+-+-+-+-
cthompson@n...
xxx-xxx-xxxx
-+-+-+-+-+-+-+-+-+-+-+-



-----Original Message-----
From: Johnson, Israel [mailto:IJohnson@R...]
Sent: Monday, November 11, 2002 11:57 AM
To: ASP Web HowTo
Subject: [asp_web_howto] RE: CDONTS

CDONTS, I believe is for running an NT Server.  If you are running a
2000
server, try a CDO for 2000 Object.... Perhaps, the Message object.

-----Original Message-----
From: Chris Thompson [mailto:cthompson@n...]
Sent: Monday, November 11, 2002 1:45 PM
To: ASP Web HowTo
Subject: [asp_web_howto] CDONTS

I have this code and It is taken and modified a bit, but it will not
work on my windows 2000 server.  Any ideas what I am missing?

Dim objNewMail
Set objNewMail =3D Server.CreateObject("CDONTS.NewMail")
objNewMail.From =3D "cthompson@n..."
objNewMail.To =3D "cthompson@n..."
objNewMail.Subject =3D "Test results"
objNewMail.Body =3D "This is a sample message."
objNewMail.Send
Set objNewMail =3D Nothing


Thanks,

Chris Thompson

-+-+-+-+-+-+-+-+-+-+-+-
cthompson@n...
xxx-xxx-xxxx
-+-+-+-+-+-+-+-+-+-+-+-


Message #7 by "Chris Thompson" <cthompson@n...> on Mon, 11 Nov 2002 13:55:10 -0700
We do have an Outlook 2000 server on our LAN also that all the email
goes through, but it is on another machine.  I tried even copying the
code from one of those sites I got from those who replied.  I changed
the email addresses appropriately and gave sample text for other text
properties and it still runs fin e with no errors, but no email is still
received.

Thanks,

Chris Thompson

-+-+-+-+-+-+-+-+-+-+-+-
cthompson@n...
xxx-xxx-xxxx
-+-+-+-+-+-+-+-+-+-+-+-



-----Original Message-----
From: Chris Thompson
Sent: Monday, November 11, 2002 1:36 PM
To: ASP Web HowTo
Subject: [asp_web_howto] RE: CDONTS

I did originally have it like this:

Dim objNewMail
Set objNewMail =3D Server.CreateObject("cdo.Message")
objNewMail.From =3D "cthompson@n..."
objNewMail.To =3D "cthompson@n..."
objNewMail.Subject =3D "HazMat test results"
objNewMail.HTMLbody =3D "This is a sample message."
objNewMail.Send
Set objNewMail =3D Nothing

Both sets of code gave no errors and returned no email.  The addresses
are correct.  The OS on the machine is Windows 2000 Server Edition


Thanks,

Chris Thompson

-+-+-+-+-+-+-+-+-+-+-+-
cthompson@n...
xxx-xxx-xxxx
-+-+-+-+-+-+-+-+-+-+-+-



-----Original Message-----
From: Johnson, Israel [mailto:IJohnson@R...]
Sent: Monday, November 11, 2002 11:57 AM
To: ASP Web HowTo
Subject: [asp_web_howto] RE: CDONTS

CDONTS, I believe is for running an NT Server.  If you are running a
2000
server, try a CDO for 2000 Object.... Perhaps, the Message object.

-----Original Message-----
From: Chris Thompson [mailto:cthompson@n...]
Sent: Monday, November 11, 2002 1:45 PM
To: ASP Web HowTo
Subject: [asp_web_howto] CDONTS

I have this code and It is taken and modified a bit, but it will not
work on my windows 2000 server.  Any ideas what I am missing?

Dim objNewMail
Set objNewMail =3D Server.CreateObject("CDONTS.NewMail")
objNewMail.From =3D "cthompson@n..."
objNewMail.To =3D "cthompson@n..."
objNewMail.Subject =3D "Test results"
objNewMail.Body =3D "This is a sample message."
objNewMail.Send
Set objNewMail =3D Nothing


Thanks,

Chris Thompson

-+-+-+-+-+-+-+-+-+-+-+-
cthompson@n...
xxx-xxx-xxxx
-+-+-+-+-+-+-+-+-+-+-+-



Message #8 by "Drew, Ron" <RDrew@B...> on Mon, 11 Nov 2002 16:27:03 -0500
Using CDONTS on a Windows 2000 server.
What made it work for me was the following step I added to the SMTP
properties:
	1) Run Internet Service Manager.
	2) Right click on SMTP to bring up the properties.
	3) Select the Delivery tab and then select Advanced from there.
	4) Enter the IP address of the Exchange Server in the "Smart
Host".
	   Place the IP address between square brackets [] e.g.
[123.123.123.123]
.............and.....................

    for i=3D1 to request.form.count
        Message =3D Message & request.form.key(i) & ": " & _
        request.form.item(i) & vbCrLf
    Next

    Set objMail =3D CreateObject("CDONTS.Newmail")
    objMail.From =3D request.form("Email")
    objMail.To =3D "your@m..."
    objMail.Subject =3D "Your sub. goes here ..."
    objMail.Body =3D Message
    objMail.Send
    Set objMail =3D Nothing
.................also..................
You must be sure that a FROM is provided.
When there is no FROM the smtp server does not send the message but
keeps it in the Badmail folder.
You can test if the user provided an e-mail address,
if not just give a dummy address (e.g. dummy@e...) just to satisfy
the smtp server.


Good Luck...Ron

-----Original Message-----
From: Chris Thompson [mailto:cthompson@n...]
Sent: Monday, November 11, 2002 3:36 PM
To: ASP Web HowTo
Subject: [asp_web_howto] RE: CDONTS


I did originally have it like this:

Dim objNewMail
Set objNewMail =3D Server.CreateObject("cdo.Message")
objNewMail.From =3D "cthompson@n..."
objNewMail.To =3D "cthompson@n..."
objNewMail.Subject =3D "HazMat test results"
objNewMail.HTMLbody =3D "This is a sample message."
objNewMail.Send
Set objNewMail =3D Nothing

Both sets of code gave no errors and returned no email.  The addresses
are correct.  The OS on the machine is Windows 2000 Server Edition


Thanks,

Chris Thompson

-+-+-+-+-+-+-+-+-+-+-+-
cthompson@n...
xxx-xxx-xxxx
-+-+-+-+-+-+-+-+-+-+-+-



-----Original Message-----
From: Johnson, Israel [mailto:IJohnson@R...]
Sent: Monday, November 11, 2002 11:57 AM
To: ASP Web HowTo
Subject: [asp_web_howto] RE: CDONTS

CDONTS, I believe is for running an NT Server.  If you are running a
2000 server, try a CDO for 2000 Object.... Perhaps, the Message object.

-----Original Message-----
From: Chris Thompson [mailto:cthompson@n...]
Sent: Monday, November 11, 2002 1:45 PM
To: ASP Web HowTo
Subject: [asp_web_howto] CDONTS

I have this code and It is taken and modified a bit, but it will not
work on my windows 2000 server.  Any ideas what I am missing?

Dim objNewMail
Set objNewMail =3D Server.CreateObject("CDONTS.NewMail")
objNewMail.From =3D "cthompson@n..."
objNewMail.To =3D "cthompson@n..."
objNewMail.Subject =3D "Test results"
objNewMail.Body =3D "This is a sample message."
objNewMail.Send
Set objNewMail =3D Nothing


Thanks,

Chris Thompson

-+-+-+-+-+-+-+-+-+-+-+-
cthompson@n...
xxx-xxx-xxxx
-+-+-+-+-+-+-+-+-+-+-+-



Message #9 by "Ken Schaefer" <ken@a...> on Tue, 12 Nov 2002 12:14:38 +1100
I assume you are getting no errors on the page.

If so, then the message has been created, and dropped into the Pickup
directory of the local SMTP server. Whether it then gets delivered depends
on whether the SMTP server can work out where it's supposed to deliver the
message. Look on the server, and see if the message is in the pickup, or
queue or badmail directories under x:\inetpub\mailroot\

Cheers
Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Chris Thompson" <cthompson@n...>
Subject: [asp_web_howto] CDONTS


I have this code and It is taken and modified a bit, but it will not
work on my windows 2000 server.  Any ideas what I am missing?

Dim objNewMail
Set objNewMail = Server.CreateObject("CDONTS.NewMail")
objNewMail.From = "cthompson@n..."
objNewMail.To = "cthompson@n..."
objNewMail.Subject = "Test results"
objNewMail.Body = "This is a sample message."
objNewMail.Send
Set objNewMail = Nothing

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Message #10 by "Chris Thompson" <cthompson@n...> on Tue, 12 Nov 2002 08:33:44 -0700
There is nothing in these folders.  Not sure what to do now


Thanks,

Chris Thompson

-+-+-+-+-+-+-+-+-+-+-+-
cthompson@n...
xxx-xxx-xxxx
-+-+-+-+-+-+-+-+-+-+-+-



-----Original Message-----
From: Ken Schaefer [mailto:ken@a...]
Sent: Monday, November 11, 2002 6:15 PM
To: ASP Web HowTo
Subject: [asp_web_howto] Re: CDONTS

I assume you are getting no errors on the page.

If so, then the message has been created, and dropped into the Pickup
directory of the local SMTP server. Whether it then gets delivered
depends
on whether the SMTP server can work out where it's supposed to deliver
the
message. Look on the server, and see if the message is in the pickup, or
queue or badmail directories under x:\inetpub\mailroot\

Cheers
Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Chris Thompson" <cthompson@n...>
Subject: [asp_web_howto] CDONTS


I have this code and It is taken and modified a bit, but it will not
work on my windows 2000 server.  Any ideas what I am missing?

Dim objNewMail
Set objNewMail =3D Server.CreateObject("CDONTS.NewMail")
objNewMail.From =3D "cthompson@n..."
objNewMail.To =3D "cthompson@n..."
objNewMail.Subject =3D "Test results"
objNewMail.Body =3D "This is a sample message."
objNewMail.Send
Set objNewMail =3D Nothing

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Message #11 by "Chris Thompson" <cthompson@n...> on Tue, 12 Nov 2002 08:34:16 -0700
I did this and it still is not working.  Right above the IP address it
has a box that says "Fully qualified domain name" and it has the
intranet server name there.  Should this be the mail server name?

Thanks,

Chris Thompson

-+-+-+-+-+-+-+-+-+-+-+-
cthompson@n...
xxx-xxx-xxxx
-+-+-+-+-+-+-+-+-+-+-+-



-----Original Message-----
From: Drew, Ron [mailto:RDrew@B...]
Sent: Monday, November 11, 2002 2:27 PM
To: ASP Web HowTo
Subject: [asp_web_howto] RE: CDONTS


Using CDONTS on a Windows 2000 server.
What made it work for me was the following step I added to the SMTP
properties:
	1) Run Internet Service Manager.
	2) Right click on SMTP to bring up the properties.
	3) Select the Delivery tab and then select Advanced from there.
	4) Enter the IP address of the Exchange Server in the "Smart
Host".
	   Place the IP address between square brackets [] e.g.
[123.123.123.123]
.............and.....................

    for i=3D1 to request.form.count
        Message =3D Message & request.form.key(i) & ": " & _
        request.form.item(i) & vbCrLf
    Next

    Set objMail =3D CreateObject("CDONTS.Newmail")
    objMail.From =3D request.form("Email")
    objMail.To =3D "your@m..."
    objMail.Subject =3D "Your sub. goes here ..."
    objMail.Body =3D Message
    objMail.Send
    Set objMail =3D Nothing
.................also..................
You must be sure that a FROM is provided.
When there is no FROM the smtp server does not send the message but
keeps it in the Badmail folder.
You can test if the user provided an e-mail address,
if not just give a dummy address (e.g. dummy@e...) just to satisfy
the smtp server.


Good Luck...Ron

-----Original Message-----
From: Chris Thompson [mailto:cthompson@n...]
Sent: Monday, November 11, 2002 3:36 PM
To: ASP Web HowTo
Subject: [asp_web_howto] RE: CDONTS


I did originally have it like this:

Dim objNewMail
Set objNewMail =3D Server.CreateObject("cdo.Message")
objNewMail.From =3D "cthompson@n..."
objNewMail.To =3D "cthompson@n..."
objNewMail.Subject =3D "HazMat test results"
objNewMail.HTMLbody =3D "This is a sample message."
objNewMail.Send
Set objNewMail =3D Nothing

Both sets of code gave no errors and returned no email.  The addresses
are correct.  The OS on the machine is Windows 2000 Server Edition


Thanks,

Chris Thompson

-+-+-+-+-+-+-+-+-+-+-+-
cthompson@n...
xxx-xxx-xxxx
-+-+-+-+-+-+-+-+-+-+-+-



-----Original Message-----
From: Johnson, Israel [mailto:IJohnson@R...]
Sent: Monday, November 11, 2002 11:57 AM
To: ASP Web HowTo
Subject: [asp_web_howto] RE: CDONTS

CDONTS, I believe is for running an NT Server.  If you are running a
2000 server, try a CDO for 2000 Object.... Perhaps, the Message object.

-----Original Message-----
From: Chris Thompson [mailto:cthompson@n...]
Sent: Monday, November 11, 2002 1:45 PM
To: ASP Web HowTo
Subject: [asp_web_howto] CDONTS

I have this code and It is taken and modified a bit, but it will not
work on my windows 2000 server.  Any ideas what I am missing?

Dim objNewMail
Set objNewMail =3D Server.CreateObject("CDONTS.NewMail")
objNewMail.From =3D "cthompson@n..."
objNewMail.To =3D "cthompson@n..."
objNewMail.Subject =3D "Test results"
objNewMail.Body =3D "This is a sample message."
objNewMail.Send
Set objNewMail =3D Nothing


Thanks,

Chris Thompson

-+-+-+-+-+-+-+-+-+-+-+-
cthompson@n...
xxx-xxx-xxxx
-+-+-+-+-+-+-+-+-+-+-+-




Message #12 by "Drew, Ron" <RDrew@B...> on Tue, 12 Nov 2002 10:38:45 -0500
I believe it should be the Exchange (Mail) Server

-----Original Message-----
From: Chris Thompson [mailto:cthompson@n...]
Sent: Tuesday, November 12, 2002 10:34 AM
To: ASP Web HowTo
Subject: [asp_web_howto] RE: CDONTS


I did this and it still is not working.  Right above the IP address it
has a box that says "Fully qualified domain name" and it has the
intranet server name there.  Should this be the mail server name?

Thanks,

Chris Thompson

-+-+-+-+-+-+-+-+-+-+-+-
cthompson@n...
xxx-xxx-xxxx
-+-+-+-+-+-+-+-+-+-+-+-



-----Original Message-----
From: Drew, Ron [mailto:RDrew@B...]
Sent: Monday, November 11, 2002 2:27 PM
To: ASP Web HowTo
Subject: [asp_web_howto] RE: CDONTS


Using CDONTS on a Windows 2000 server.
What made it work for me was the following step I added to the SMTP
properties:
	1) Run Internet Service Manager.
	2) Right click on SMTP to bring up the properties.
	3) Select the Delivery tab and then select Advanced from there.
	4) Enter the IP address of the Exchange Server in the "Smart
Host".
	   Place the IP address between square brackets [] e.g.
[123.123.123.123] .............and.....................

    for i=3D1 to request.form.count
        Message =3D Message & request.form.key(i) & ": " & _
        request.form.item(i) & vbCrLf
    Next

    Set objMail =3D CreateObject("CDONTS.Newmail")
    objMail.From =3D request.form("Email")
    objMail.To =3D "your@m..."
    objMail.Subject =3D "Your sub. goes here ..."
    objMail.Body =3D Message
    objMail.Send
    Set objMail =3D Nothing .................also..................
You must be sure that a FROM is provided.
When there is no FROM the smtp server does not send the message but
keeps it in the Badmail folder.
You can test if the user provided an e-mail address,
if not just give a dummy address (e.g. dummy@e...) just to satisfy
the smtp server.


Good Luck...Ron

-----Original Message-----
From: Chris Thompson [mailto:cthompson@n...]
Sent: Monday, November 11, 2002 3:36 PM
To: ASP Web HowTo
Subject: [asp_web_howto] RE: CDONTS


I did originally have it like this:

Dim objNewMail
Set objNewMail =3D Server.CreateObject("cdo.Message")
objNewMail.From =3D "cthompson@n..."
objNewMail.To =3D "cthompson@n..."
objNewMail.Subject =3D "HazMat test results"
objNewMail.HTMLbody =3D "This is a sample message."
objNewMail.Send
Set objNewMail =3D Nothing

Both sets of code gave no errors and returned no email.  The addresses
are correct.  The OS on the machine is Windows 2000 Server Edition


Thanks,

Chris Thompson

-+-+-+-+-+-+-+-+-+-+-+-
cthompson@n...
xxx-xxx-xxxx
-+-+-+-+-+-+-+-+-+-+-+-



-----Original Message-----
From: Johnson, Israel [mailto:IJohnson@R...]
Sent: Monday, November 11, 2002 11:57 AM
To: ASP Web HowTo
Subject: [asp_web_howto] RE: CDONTS

CDONTS, I believe is for running an NT Server.  If you are running a
2000 server, try a CDO for 2000 Object.... Perhaps, the Message object.

-----Original Message-----
From: Chris Thompson [mailto:cthompson@n...]
Sent: Monday, November 11, 2002 1:45 PM
To: ASP Web HowTo
Subject: [asp_web_howto] CDONTS

I have this code and It is taken and modified a bit, but it will not
work on my windows 2000 server.  Any ideas what I am missing?

Dim objNewMail
Set objNewMail =3D Server.CreateObject("CDONTS.NewMail")
objNewMail.From =3D "cthompson@n..."
objNewMail.To =3D "cthompson@n..."
objNewMail.Subject =3D "Test results"
objNewMail.Body =3D "This is a sample message."
objNewMail.Send
Set objNewMail =3D Nothing


Thanks,

Chris Thompson

-+-+-+-+-+-+-+-+-+-+-+-
cthompson@n...
xxx-xxx-xxxx
-+-+-+-+-+-+-+-+-+-+-+-





Message #13 by "Chris Thompson" <cthompson@n...> on Tue, 12 Nov 2002 08:49:44 -0700
I have this code I got from the web yesterday.  It seems to work, but it
has references to links to Microsoft.com.  I do not understand what this
is for.  Microsoft changes links often and I do not want the reliability
of my site dependent upon Microsoft.  I really need to get this working.
My code from the other posts using the cdo.message and cdonts.newmail
objects work at my home from my Win2K Pro machine, but they do not work
here at work on a Win2K Server Edition Intranet server.  We have
Exchange 2000 here.  I am not sure why it does not work.  I am not sure
what I need to do.  If anyone has any ideas, they would be greatly
appreciated.  I am indeed getting NO errors when executing the code.

The New Flaky (based on Microsoft links within) Code:
'**********************************************************************
<!--METADATA TYPE=3D"typelib" 
UUID=3D"CD000000-8B95-11D1-82DB-00C04FB1625D"
NAME=3D"CDO for Windows 2000 Type Library" -->
<!--METADATA TYPE=3D"typelib" 
UUID=3D"00000205-0000-0010-8000-00AA006D2EA4"
NAME=3D"ADODB Type Library" -->
<%
' Send by connecting to port 25 of the SMTP server.
'Dim iMsg
Dim iConf
Dim Flds
Dim strHTML

'Const cdoSendUsingPort =3D 2

set iMsg =3D CreateObject("CDO.Message")
set iConf =3D CreateObject("CDO.Configuration")

Set Flds =3D iConf.Fields

' Set the CDOSYS configuration fields to use port 25 on the SMTP server.

With Flds
    .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") 
=3D
cdoSendUsingPort
    'ToDo: Enter name or IP address of remote SMTP server.
    .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") 
=3D
"<mail server address here>"

.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontime
out") =3D 10 
    .Update
End With

' Build HTML for message body.
strHTML =3D "<HTML>"
strHTML =3D strHTML & "<HEAD>"
strHTML =3D strHTML & "<BODY>"
strHTML =3D strHTML & "<b> This is the test HTML message body</b></br>"
strHTML =3D strHTML & "</BODY>"
strHTML =3D strHTML & "</HTML>"

' Apply the settings to the message.
With iMsg
    Set .Configuration =3D iConf
    .To =3D "<email address here>" 'ToDo: Enter a valid email address.
    .From =3D "<email address here>" 'ToDo: Enter a valid email address.
    .Subject =3D "This is a test CDOSYS message (Sent via Port 25)"
    .HTMLBody =3D strHTML
    .Send
End With

' Clean up variables.
Set iMsg =3D Nothing
Set iConf =3D Nothing
Set Flds =3D Nothing

%>
'**********************************************************************

Thanks,

Chris Thompson

-+-+-+-+-+-+-+-+-+-+-+-
cthompson@n...
xxx-xxx-xxxx
-+-+-+-+-+-+-+-+-+-+-+-



-----Original Message-----
From: Ken Schaefer [mailto:ken@a...]
Sent: Monday, November 11, 2002 6:15 PM
To: ASP Web HowTo
Subject: [asp_web_howto] Re: CDONTS

I assume you are getting no errors on the page.

If so, then the message has been created, and dropped into the Pickup
directory of the local SMTP server. Whether it then gets delivered
depends
on whether the SMTP server can work out where it's supposed to deliver
the
message. Look on the server, and see if the message is in the pickup, or
queue or badmail directories under x:\inetpub\mailroot\

Cheers
Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Chris Thompson" <cthompson@n...>
Subject: [asp_web_howto] CDONTS


I have this code and It is taken and modified a bit, but it will not
work on my windows 2000 server.  Any ideas what I am missing?

Dim objNewMail
Set objNewMail =3D Server.CreateObject("CDONTS.NewMail")
objNewMail.From =3D "cthompson@n..."
objNewMail.To =3D "cthompson@n..."
objNewMail.Subject =3D "Test results"
objNewMail.Body =3D "This is a sample message."
objNewMail.Send
Set objNewMail =3D Nothing

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



  Return to Index