Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 8th, 2005, 03:52 AM
Authorized User
 
Join Date: Jan 2005
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to p2ptolu Send a message via Yahoo to p2ptolu
Default send e-mail to user after registration

i have designed and implemented an asp site that allows users to register online and they decide what password they want , but i want to be able to include codes that will send a mail to the user on registering thanking him/her for registering with the site,please help ,thank you.

 
Old April 8th, 2005, 04:07 AM
Authorized User
 
Join Date: Jan 2004
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi

Code I used was this:


strEmail = request.form("Email")
strBody= "Thank you for your request"

set objEMail = Server.CreateObject("CDONTS.NewMail")
     objEMail.To = strEmail
     objEMail.From = "[email protected]"
     objEMail.subject = "Confirmation"
     objEMail.body = strBody

     objEMail.send
    set objEMail = nothing

response.redirect "registered.asp"

However this does depend on which dll is installed. The above uses cdont.dll which usually ships with Win2k but can also use cdosys.dll which has a different format.

Hope this helps.

Lindsey
 
Old April 8th, 2005, 04:26 AM
Authorized User
 
Join Date: Jan 2005
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to p2ptolu Send a message via Yahoo to p2ptolu
Default

thanks how do i know the dll to use because i searched and found cdosys.dll on my system, am using win xp
and secondly where precisely is the code to be placed is it in the registration form or validation etc.i'll send a sample code to you.


 
Old April 8th, 2005, 05:00 AM
Authorized User
 
Join Date: Jan 2004
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi

Code would go in the validation page. There's another posting which demonstrates how to code a cdosys page.

http://p2p.wrox.com/topic.asp?TOPIC_...chTerms=cdosys

Might find this helpful.

Lindsey
 
Old April 8th, 2005, 05:15 AM
Authorized User
 
Join Date: Jan 2005
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to p2ptolu Send a message via Yahoo to p2ptolu
Default

that means i can not use

strEmail = request.form("Email")
strBody= "Thank you for your request"

set objEMail = Server.CreateObject("CDONTS.NewMail")
     objEMail.To = strEmail
     objEMail.From = "[email protected]"
     objEMail.subject = "Confirmation"
     objEMail.body = strBody

     objEMail.send
    set objEMail = nothing

response.redirect "registered.asp"


but ithink i want to try it out now, is it worth trying or i just go for the link you sent to me


 
Old April 8th, 2005, 05:18 AM
Authorized User
 
Join Date: Jan 2004
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If you only have cdosys.dll installed then I would go and try the link.

Lindsey
 
Old April 8th, 2005, 05:32 AM
Authorized User
 
Join Date: Jan 2005
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to p2ptolu Send a message via Yahoo to p2ptolu
Default

how do i know the smtp server to use







Similar Threads
Thread Thread Starter Forum Replies Last Post
Send mail and attachments with PHP mail function Lofa Beginning PHP 1 June 2nd, 2008 03:24 PM
How to send mail Jolley_tolson PHP How-To 0 August 13th, 2007 03:38 AM
Cannot send mail rajanikrishna JSP Basics 3 March 17th, 2006 01:39 AM
Send E-mail meme2002bh Access ASP 2 September 30th, 2005 12:53 AM
send e-mail to user after registration 2 p2ptolu Classic ASP Databases 0 April 18th, 2005 06:28 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.