<% recipientname = Request.Form("recipientname") recipientmail = Request.Form("recipientmail") sendername = Request.Form("sendername") sendermail = "onlineintern@kingworld.com" If (recipientname <> "" and recipientmail <> "" and sendername <> "") Then recipientname = Server.HTMLEncode(Trim(Request.Form("recipientname"))) recipientmail = Server.HTMLEncode(Trim(Request.Form("recipientmail"))) sendername = Server.HTMLEncode(Trim(Request.Form("sendername"))) subject = "Everybody Loves Raymond - A clip from Today's Show" body = "Your friend, " & sendername & ", has sent you a link to watch a video clip from today's Everybody Loves Raymond. Each day a new clip will be posted, so come back often for more laughs." & vbcrlf & vbcrlf body = body & "To view today's clip visit:" & vbcrlf & "http://www.everybodylovesray.com/html/dailyclips" & vbcrlf Call SendMail(sendermail, "Everybody Loves Raymond", recipientmail, recipientname, subject, body) Response.Redirect("sendtofriend_thanks.html") End If Sub SendMail(FromMail, FromName, MailTo, MailToName, Subject, Body) strHost = "bourbon.altvox.com" Set Mail = Server.CreateObject("Persits.MailSender") ' enter valid SMTP host Mail.Host = strHost Mail.From = FromMail Mail.FromName = FromName Mail.AddAddress MailTo, MailToName ' message subject Mail.Subject = Subject ' message body Mail.Body = Body strErr = "" bSuccess = False On Error Resume Next ' catch errors Mail.Send ' send message If Err <> 0 Then ' error occurred strErr = Err.Description else bSuccess = True End If End Sub %> Everybody Loves Raymond
Close