logo
g Text Version
Beauty & Self
Books & Music
Career
Computers
Education
Family
Food & Wine
Health & Fitness
Hobbies & Crafts
Home & Garden
Money
News & Politics
Relationships
Religion & Spirituality
Sports
Travel & Culture
TV & Movies

dailyclick
Bored? Games!
Nutrition
Postcards
Take a Quiz
Rate My Photo

new
Painting
Heart Disease
Horror Literature
Dating
Hiking & Backpacking
SF/Fantasy Books
Healthy Foods


dailyclick
All times in EST

Full Schedule
g
g ASP Site

BellaOnline's ASP Editor

g

Send a Friend - Sending the Message

Guest Author - Lisa Shea

You've set up a button to encourage your visitors to Send a Friend a URL, and you've gathered the info from them. Now it's time to send the message.

The final step is in essence mostly a mailing script. If you haven't done ASP mailing scripts before, read my Sending Mail with ASP article.

Again, ignore the **********s :)

****************************

<%
ToEmail = Request.Form("receiver")
RecEmail = Request.Form("sender")
Comment = Request.Form("comment")

URL = Request.Form("url")

Subject = RecEmail & " would like you to look at this!"

Body = "A friend of yours, " & RecEmail & ", thought you'd enjoy reading an interesting article " & vbCrLf & _
"at http://www.XXXXXXXXX.com" & vbCrLf & vbCrLf & _
"Article URL: " & URL & vbCrLf & vbCrLf & _
"Your friend's comments: " & vbCrLf & _
Comment & vbCrLf & vbCrLf & _
"Visit this article and many other interesting articles at:" & vbCrLf & _
"http://www.XXXXXXXXXX.com"
Impt = 2
FromEmail = RecEmail

Dim objMail
set objMail = CreateObject("CDONTS.NewMail")
objMail.Send FromEmail,ToEmail,Subject,Body,Impt
set objMail = Nothing

Response.Redirect("emailthanks.asp?url=" & URL)
%>

*****************************

OK, the script takes in the URL and other info you gathered up, and sends a mail message out. Be sure to change the XXXXXXXXXs to your own website name of course! When it's done, it goes off to emailthanks.asp. You can have that page be just a regular generic 'thank you for emailing someone' page, and because the URL is passed in, you can have a link that says 'return to the URL you just came from' very easily.

Introduction to ASP Ebook

Download this ebook to get everything you need to know about learning ASP - from a step by step tutorial to function lists, sample code, common errors and solutions, and much more! 101 pages.
This site needs an editor - click to learn more!

Add Send+a+Friend+%2D+Sending+the+Message to Twitter Add Send+a+Friend+%2D+Sending+the+Message to Facebook Add Send+a+Friend+%2D+Sending+the+Message to MySpace Add Send+a+Friend+%2D+Sending+the+Message to Del.icio.us Digg Send+a+Friend+%2D+Sending+the+Message Add Send+a+Friend+%2D+Sending+the+Message to Yahoo My Web Add Send+a+Friend+%2D+Sending+the+Message to Google Bookmarks Add Send+a+Friend+%2D+Sending+the+Message to Stumbleupon Add Send+a+Friend+%2D+Sending+the+Message to Reddit




RSS | Related Articles | Editor's Picks Articles | Top Ten Articles | Previous Features | Site Map


For FREE email updates, subscribe to the ASP Newsletter


Past Issues


print
Printer Friendly
bookmark
Bookmark
tell friend
Tell a Friend
forum
Forum
email
Email Editor


Content copyright © 2013 by Lisa Shea. All rights reserved.
This content was written by Lisa Shea. If you wish to use this content in any manner, you need written permission. Contact BellaOnline Administration for details.

g


g features
Best uses for RSS

RSS and its future.

Force Download Dialog box with ASP

Archives | Site Map

forum
Forum
email
Contact

Past Issues
memberscenter


vote
Poetry
Daily
Weekly
Monthly
Less than Monthly



BellaOnline on Facebook
g


| About BellaOnline | Privacy Policy | Advertising | Become an Editor |
Website copyright © 2013 Minerva WebWorks LLC. All rights reserved.


BellaOnline Editor