<?xml version="1.0" encoding="UTF-8"?>
<% 

Response.ContentType = "text/html" 
Response.Charset = "UTF-8" 

isim=request.form("isim")
mail=request.form("mail")
mesaj=request.form("mesaj")
ip = request.servervariables("remote_host")


if isim <>"" and mail <>"" and mesaj <>"" then
'kayit

Function tr(gelenveri)
gelenveri = LCase(gelenveri)
gelenveri = Replace(gelenveri ,Chr(208),"g",1,-1,0)
gelenveri = Replace(gelenveri ,Chr(240),"g",1,-1,0)
gelenveri = Replace(gelenveri ,Chr(222),"s",1,-1,0)
gelenveri = Replace(gelenveri ,Chr(254),"s",1,-1,0)
gelenveri = Replace(gelenveri ,Chr(199),"c",1,-1,0)
gelenveri = Replace(gelenveri ,Chr(231),"c",1,-1,0)
gelenveri = Replace(gelenveri ,Chr(221),"i",1,-1,0)
gelenveri = Replace(gelenveri ,Chr(236),"i",1,-1,0)
gelenveri = Replace(gelenveri ,Chr(237),"i",1,-1,0)
gelenveri = Replace(gelenveri ,Chr(214),"o",1,-1,0)
gelenveri = Replace(gelenveri ,Chr(246),"o",1,-1,0)
gelenveri = Replace(gelenveri ,Chr(252),"u",1,-1,0)
gelenveri = Replace(gelenveri ,Chr(220),"u",1,-1,0)
gelenveri = Replace(gelenveri ,"'","",1,-1,0)
tr = gelenveri 
End Function

%>
<!--#include file ="veriables.asp"-->
<%

icerik = "<meta http-equiv = Content-Type content = text/html; charset = utf-8>"
icerik = icerik & sitename & " - iletisim formu<br><br>"
icerik = icerik & "<b> Ad Soyad: </b> " & tr(request.form("isim")) & "<br>"
icerik = icerik & "<b> E-Posta : </b> " & tr(request.form("mail")) & "<br>"
icerik = icerik & "<b> Konu : </b> " & tr(request.form("konu")) & "<br>"
icerik = icerik & "<b> Web sitesi : </b> " & tr(request.form("site")) & "<br>"
icerik = icerik & "<b> Ip : </b> " & request.servervariables("remote_host") & "<br><br>"
icerik = icerik & "<b> Tarih : </b> " & now() & "<br>"
icerik = icerik & "<b> Mesaj : </b> " & tr(request.form("mesaj")) & "<br>"

Set obj = Server.CreateObject("Persits.MailSender")
	
obj.Host = mserv
obj.From = request.form("mail")
obj.AddAddress posta
obj.Subject = "iletisim bildirim"
obj.Body = icerik
obj.IsHTML = True

on error resume next
obj.Send

response.redirect "iletisim.asp?run=thanks&name=" & request.form("isim")
response.end
set obj = Nothing

else

response.redirect "iletisim.asp?run=error&isim=" & Request.Form("isim") & "&mail=" & Request.Form("mail") & "&mesaj=" & Request.Form("mesaj")
response.end
end if

%>
