Jump to content

How to build a refer a friend function on a websit


hanxiao
 Share

Recommended Posts

Just wonder how to make it in HTML? Or do I need to use other languages, such as JavaScript, PHP and ASP.NET?I only know the mailto thing, which load outlook in user's computer and send a email to the address specified. Any way can do sending a web page or article on that page to a friend's email address? It's like you put your friend's name and maybe your name as well, then friend's email and some comments, click the button, a email from the website will send to the email address.Thanks.

Link to comment
Share on other sites

you'll need a server side scripting language such as php or asp to process the email sending.the one i use on my site (see siggie) is kinda completed for a beginner, and so it'll probably baffle you as its not that easy to edit the way you want it.do a google search for "tell a friend script" and you should find a few.we can help you with setting it up, and pointing you in the right direction, but not providing complete scripts :)

Link to comment
Share on other sites

This is the code in asp.net. hope i could help you. :)

Dim mail, emailmsgusername = n1.GetFieldValue("Select Firstname as field_value from Users where useremail='" & txtemailforgot.Text & "'")emailmsg = "<html><body topmargin=0 leftmargin=0><font face='Verdana, Arial, Helvetica, sans-serif' size=2 color=#003399><b>Dear " & username & ":<br><br>Login Details for CommDragon.com<br><br></b></font><table width='50%' style='font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px;'><tr><td width='35%'>Login Name:</td><td width='65%'>" & txtemailforgot.Text & "</td></tr><tr><td>Password:</td><td>" & pass & "</td></tr></table><br><font face='Verdana, Arial, Helvetica, sans-serif' size=2 color=#003399><b>Regards:<br>www.commdragon.com</b></font></body></html>"mail = Server.CreateObject("Persits.MailSender")mail.IsHTML = Truemail.Subject = "Your account in commdragon.com"mail.From = "websitemanager@commdragon.com"mail.FromName = "Commdragon.com"mail.Addaddress(txtemailforgot.Text)mail.Host = "mail.mindragon.com"mail.body = emailmsgOn Error Resume Nextmail.Send()mail = Nothinglblerrors.Text = "Your password has been mailed to your account.<br>Please check your email immediately and sign in to CommDragon.com."lblerrors.Visible = True

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...