%@ Language=VBScript%>
<%
mes = ""
IsSuccess = false
if request.form("select1") <> "" Then
sTo = "amol@valmakk.com, " & Trim(Request.Form("txtFrom"))
else
sTo = "amol@valmakk.com"
end if
'sBcc = "avinash.birvatkar@synergytechservices.com"
sFrom = Trim(Request.Form("txtFrom"))
sSubject = Trim(Request.Form("txtSubject"))
sMailServer = "mail.sljhighschool.com"
dim strstring
strstring=strstring & "Name : " & Request.Form("txtName") & "
"
strstring=strstring & "Email : " & sFrom & "
"
strstring=strstring & "Subject : " & Request.Form("txtSubject") & "
"
strstring=strstring & "Address : " & Request.Form("txtAddress") & "
"
strstring=strstring & "Telephone : " & Request.Form("txtTel") & "
"
strstring=strstring & "Details : " & Request.Form("txtBody") & "
"
sBody = strstring
if Request("__action")="TestEMail" then
TestEMail()
end if
Sub TestEMail()
Set objMail = Server.CreateObject("CDO.Message")
Set objConf = Server.CreateObject("CDO.Configuration")
Set objFields = objConf.Fields
With objFields
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = sMailServer
.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Update
End With
With objMail
Set .Configuration = objConf
.From = sFrom
.To = sTo
' .Bcc = sBcc
.Subject = sSubject
.HTMLBody = sBody
End With
Err.Clear
on error resume next
objMail.Send
if len(Err.Description) = 0 then
mes = " Your Message has been sent."
IsSuccess = true
else
mes = " " + Err.Description + " TESTS FAILED!"
end if
Set objFields = Nothing
Set objConf = Nothing
Set objMail = Nothing
End sub
Sub Alert(html)
if IsSuccess then
Response.Write "