Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 23rd, 2005, 01:32 PM
Authorized User
 
Join Date: Aug 2005
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Sending email from asp page

Do anyone know how to send a confirmation email from an asp webpage? Or do you know the code for getting the email address that was given and send a email back to that person? The reason is I have a guestbook on my website that that send the information to my database and i wanted to know how to get that email address that the user entered and send them a email thanking them for there comments. If anyone have a small clue on how this is done can i please get a pointer.

Thank You :)
Reply With Quote
  #2 (permalink)  
Old August 24th, 2005, 11:13 AM
Authorized User
 
Join Date: Jul 2005
Location: New York, New York, .
Posts: 59
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If you wanna email with asp, try the following:

Set yourEmail=Server.CreateObject("CDO.Message")

With yourEmail
   .Subject=theSubject
   .From= "yourEmailAddress@yourDomain"
   .To = "yourGuestBookReader@theirDomain"
   .TextBody= "thank you. .blah blah blah ... "
   .Send
End With

set yourMail=nothing

I personally email as soon as the database insert is finished. So, there's no need to get the email from database.

Reply With Quote
  #3 (permalink)  
Old August 24th, 2005, 02:14 PM
Authorized User
 
Join Date: Aug 2005
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank You:)
But do this send it to the person sending the e-mail or do it send an auto email

Reply With Quote
  #4 (permalink)  
Old August 24th, 2005, 03:00 PM
Authorized User
 
Join Date: Jul 2005
Location: New York, New York, .
Posts: 59
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sorry. I don't understand

Anyway this block of code can invoke the email procedure.
Or what exactly do you wanna do?

Reply With Quote
  #5 (permalink)  
Old August 24th, 2005, 05:07 PM
Authorized User
 
Join Date: Aug 2005
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I just want to capture the e-mail address and send a thank you expression.

I think the code may help
Thanks alot

Reply With Quote
  #6 (permalink)  
Old August 25th, 2005, 11:25 AM
Friend of Wrox
Points: 2,101, Level: 18
Points: 2,101, Level: 18 Points: 2,101, Level: 18 Points: 2,101, Level: 18
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2003
Location: , , .
Posts: 599
Thanks: 6
Thanked 3 Times in 3 Posts
Default

Yes, g2000 gave you the code for that.

I don't know if this is what you mean but capture the email address with using a form and on the post page:

[form page]
<form name="guest" action="guest_process.asp" method="post">
Email Address: <input type="text" name="ReaderEmailAddress"><br>
<input type="submit" value="Submit">
</form>

[post page]
<%
    varReaderEmailAddress = Request("ReaderEmailAddress")

    Set yourEmail=Server.CreateObject("CDO.Message")

   yourEmail.Subject=theSubject
   yourEmail.From= "yourEmailAddress@yourDomain"
   yourEmail.To = varReaderEmailAddress
   yourEmail.TextBody= "thank you. .blah blah blah blig blig blam bodzoi... "
   yourEmail.Send
   set yourMail=nothing
   Response.Write "Thank you email sent to: " & varReaderEmailAddress
%>

This code works but unfortunately it doesn't work at my house since my ISP doesn't allow email being sent from other domains through their mail server.



Reply With Quote
  #7 (permalink)  
Old August 25th, 2005, 01:05 PM
Authorized User
 
Join Date: Aug 2005
Location: , , .
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Well, Thank You! :)
I hope this works.

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending Email with ASP.NET stu9820 ASP.NET 1.0 and 1.1 Basics 19 February 9th, 2007 03:50 AM
sending email through asp.net amol.mahajan85@gmail.com .NET Framework 1.x 2 October 19th, 2006 12:13 PM
sending Email thru ASP Code zaeem Classic ASP Basics 4 November 13th, 2003 04:03 PM



All times are GMT -4. The time now is 01:27 AM.


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