Search Tools Links Login

Tell a friend ver 1.1


Tell a friend

Original Author: Bhushan-

Code

Tell a Friend
So once he clicks on that hyperlink the URL is carried to mail.asp and let us see what mail.asp will do for us.


Tell a Friend


<%
URL = Request.QueryString("URL")
If Len(URL) = 0 Then URL = "http://www.planet-source-code.com" ' The default URL
name=request.form("Sendersname")
from=request.form("SendersEmail")
message=Request.Form("Message")
If Len(Request.Form("SendersEmail")) > 0 Then ' Time to send the emails
Dim objMail,FriendEmail,I
sBody = "This Page at " & URL & " has been recommended by " & name & " at " & Request.Form("SendersEmail") & vbCrLf & " <-- Message For You--> " & vbcrlf & message
I=0
' Loop until no more email addresses are given.
Do While True
FriendEmail = Request.Form("FriendEmail" & I)
If Len(FriendEmail) = 0 Then
Exit Do
Else
Set objMail = CreateObject("CDONTS.NewMail")
objMail.From = name
objMail.Subject = "Recommended Page"
objMail.Importance=1
objMail.Body = sBody
objMail.To = FriendEmail
objMail.Send()
End If
I=I+1
Loop
Set objMail = Nothing%>
<%
Response.write "

Thank you for Recommending us to Your Friends.

"%>

<%
Response.write "Click here to return to " & URL & "
"
Else
%>
















































Recommended URL:  

<%= URL %>


Your Name:
Your Email:
Your friends emails. 
1.
2.
2.
2.
  
Message










<% End If %>






About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 101 times

Categories

ASP/ HTML

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.