<% islem = Request.Querystring("GET") %>
<% IF islem = "" THEN %>
<% End If %>
<% IF islem = "Send" THEN
markasi = Trim(Request.Form("markasi"))
fiyat = Trim(Request.Form("fiyat"))
model = Trim(Request.Form("model"))
yil = Trim(Request.Form("yil"))
saat = Trim(Request.Form("saat"))
aksesuar = Trim(Request.Form("aksesuar"))
aciklamalar = Trim(Request.Form("aciklamalar"))
ad = Trim(Request.Form("ad"))
adres = Trim(Request.Form("adres"))
koy = Trim(Request.Form("koy"))
ilce = Trim(Request.Form("ilce"))
sehir = Trim(Request.Form("sehir"))
telefon = Trim(Request.Form("telefon"))
fax = Trim(Request.Form("fax"))
gsm = Trim(Request.Form("gsm"))
email = Trim(Request.Form("email"))
imza = Trim(Request.Form("imza"))
IF fiyat = "" OR yil = "" OR saat = "" OR email = "" OR imza = "" THEN
hata = "* İşaretli alanların doldurulması zorunludur. Lütfen bu alanları doldurunuz."
HATAVAR
Response.End
END IF
If Len(email) < 5 Then
bIsValid = "False"
Else
If Instr(1, email, " ") <> 0 Then
bIsValid = "False"
Else
If InStr(1, email, "@", 1) < 2 Then
bIsValid = "False"
Else
If InStrRev(email, ".") < InStr(1, email, "@", 1) + 2 Then
bIsValid = "False"
End If
End If
End If
End If
IF bIsValid = "False" THEN
hata = "Email adresiniz geçersiz
Lütfen geçerli ve kullanıma açık bir email adresi girin."
HATAVAR
Response.End
end if
body="Traktörün Markası : "& markasi &" Fiyatı : "& fiyat &" Model Adı : "&model &" Model Yılı : "&yil &" Çalışma Saati : "& saat &" Aksesuarlar ve Donanımlar : "& aksesuar &" Açıklamalar : "& aciklamalar &" Adı Soyadı / Firma Adı : "& ad &" Adres : "& adres&" Köy : "& koy &" İlçe : "& ilce &" Şehir : "& sehir&" Tel: "& telefon&" Fax : "& fax &" Gsm : "& gsm &" E-Posta : "& email&" İmza : "& imza &""
Set Mail = Server.CreateOBject("Persits.MailSender")
Mail.Host = "mail.traktordergisi.com" 'SMTP server adresiniz
Mail.From = "info@traktordergisi.com" ' gonderen mail adresi
Mail.FromName = ""& ad &"" 'gonderen adi
Mail.AddAddress "info@traktordergisi.com" ' sizin mail adresiniz
Mail.Subject = "2.El Traktör Kayıt Formu" ' konu
Mail.Body = body ' mesaj
Mail.IsHtml = True
On Error Resume Next
Mail.Send
If Err <> 0 Then
Response.Write "Bir Hata Oluştu: " & Err.Description
End If
Response.Redirect "ok.asp"
Set RS = Nothing
END IF %>
<% SUB HATAVAR %>