Jump to content

How to make a Refer a Friend function?

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 post
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 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.

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.

  • Create New...