Jump to content

How to make a Refer a Friend function?


hanxiao

Recommended Posts

Just wonder how to make it in ASP.NET? Or other languages, such as JavaScript, PHP these kind of thing?I only know the mailto thing in HTML, 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

Hi! I have a code for mail but this function should be put on the submit event of button! Hope I have helped you! :)

        Dim mail, emailmsg        username = 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 = True	mail.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 = emailmsg	On Error Resume Next	mail.Send()	mail = Nothing	lblerrors.Text = "Your password has been mailed to your account.<br>Please check your email immediately and sign in to CommDragon.com."	lblerrors.Visible = True	Session("logstat") = ""

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
×
×
  • Create New...