<%@ Import Namespace="Omni" %>
<%@ Import Namespace="System.Net.Mail" %>
<%
Dim sReferer As String = ""
Dim sShowAfterSubmit As String = ""
If Len(Request.Form.ToString) > 0 Then
sShowAfterSubmit = "
Your email has now been sent, thanks for recommending GoSki.co.uk to your friends.
"
sReferer = Request.Form("frmref").ToString
Dim sTemplate As String = Request.Form("mailtemplate")
Dim sFro As String = Request.Form("eFro")
Dim sTo1 As String = Request.Form("eTo1")
Dim bOpt As Boolean = False
If Not IsNothing(Request.Form("cOpt")) Then
If LCase(Request.Form("cOpt")) = "true" Then
bOpt = True
End If
End If
Dim sTo2 As String = ""
Dim sTo3 As String = ""
If Not IsNothing(Request.Form("eTo2")) Then sTo2 = Request.Form("eTo2")
If Not IsNothing(Request.Form("eTo3")) Then sTo2 = Request.Form("eTo3")
Dim oTAF As tellafriend = Nothing
Try
oTAF = New tellafriend(New Uri(sReferer), New MailAddress(sFro), bOpt, New MailAddress(sTo1) , sTo2, sTo3)
Try
oTAF.SendMail(sTemplate, "Have a look at " & sReferer, Request.Form)
Catch ex2 As Exception
sShowAfterSubmit = "
[2]" & ex2.Message & "
"
End Try
Catch ex1 As Exception
sShowAfterSubmit = "
[1]" & ex1.Message & "
"
End Try
If Not IsNothing(oTAF) Then oTAF = Nothing
Else
sReferer = Request.QueryString("qstref").ToString
End If
%>
Tell a friend about GoSki.co.uk
<%
If Len(sShowAfterSubmit) > 0 Then
Response.Write(sShowAfterSubmit)
Else
%>
<%
End If
%>