Jump to content

How to build a refer a friend function on a websit


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 post
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 post
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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...