%@LANGUAGE="VBSCRIPT"%>
<% If Request.Form("Server") <> "" Then On Error Resume Next 'Tells server to wait until all scripts on this page are processed before 'responding to client Response.Buffer = TRUE Set Jmail = Server.CreateObject( "JMail.Message" ) 'Enable logging Jmail.Logging = TRUE 'JMail will not throw exceptions. Message.send() will return TRUE or FALSE 'depending on the success of the operation. Jmail.Silent = TRUE Jmail.ReturnReceipt = Request.Form("Receipt") Jmail.FromName = "Menufinder Form" Jmail.ReplyTo = Request.Form("ReplyTo") Jmail.AddRecipient "westps@tiscali.co.uk" JMail.Subject = "Menufinder" For i = 1 to (Request.Form.Count) body = body & Request.Form.Key(i) & ": " & Request.Form.Item(i) & vbcrlf Next JMail.Body = Body 'Priority 1=Urgent, 3=Normal, 5=Lowest JMail.Priority = CInt(Request.Form("Priority")) If Not Jmail.Send(Request.Form("Server")) Then ' There was an error - print the error log %><%=Jmail.log%>
<% Else Response.Redirect "sendsucces.asp" %> <% End If Set JMail = Nothing End if %>