Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CDONTS with IIS 5 on Win 2000 2

Status
Not open for further replies.

jcbr

Programmer
Apr 19, 2001
12
US
I am trying to set up cdonts to send an email from asp page. Here is my code:
DIM myMail
SET myMail = Server.CreateObject("CDONTS.Newmail")
myMail.From = "me@mycompany.com"
myMail.To = "me@mycompany.com"
myMail.Subject = "test"
myMail.Body = "body"
myMail.Send()
SET myMail = Nothing

From all the other postings I've looked at, this code seems like it should work. When I run this code, nothing happens, though. No errors, nothing. I get no email sent to me.
Do you know if I:
1) if and what I should put in my global.asa file
2) if cdonts works with IIS 5 on a windows 2000 server?
Any help is greatly appreciated...
 
do you have the SMTP server installed on your machine? CDONTS requires it.
 
Works great for me on Win2k Server. Make sure SMTP Server is installed and CDO for NTS knows to use the default server. Use this for a base. The form sends the variables and posts them to this set of code.

"Set objMail = Server.CreateObject("CDONTS.Newmail")
objMail.To = request.form ("recipient")
objMail.Subject = request.form ("name")
objMail.From = request.form ("email")
objMail.Body = request.form ("message")
objMail.Send
Set objMail = Nothing
"
As Eddie Murphy would say as Velvet Jones. "It's as simple as that"
 
Thanks, everyone, for the help. We ended up using persits, and everything works fine!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top