Forum Moderators: open

Message Too Old, No Replies

'Email this page to a friend' - is this ASP?

and so how do you do it?

         

rj87uk

1:42 pm on Sep 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I like the "email this page to a friend" function on other peoples websites and i wanted to know if it is doing it through ASP?

If so how would you set about doing it?

I think it could be a good tool...

mattglet

2:00 pm on Sep 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You first need a script that accepts a URL parameter, and will put that URL into an email.

something like this:

<a href = "email_to_friend.asp?url=<%=Server.URLEncode("http://" & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("URL") & "?" & Request.ServerVariables("QUERY_STRING"))%>">Click here to email this to a friend.</a>

raywood

1:55 pm on Sep 10, 2004 (gmt 0)

10+ Year Member



I do it by linking to a form with input for the friend's email, the sender's name, and a textbox for the friend to input a short message. The form then sends the email from my server. I've used CDONTS, a commercial email object, and the built in smtp object in dotnet. They all worked great. Sometimes I ask for permission to save their email addresses and send them a newsletter.