<%
islem=Request.Querystring("islem")
if islem="gonder" Then
call gonder
end if
if islem="adbos" Then
hata="<font color=#8E1A23>Lütfen Adınızı Soyadınızı Yazınız</font>"
end if
if islem="telbos" Then
hata="<font color=#8E1A23>Lütfen Telefon Numaranızı Yazınız.</font>"
end if
if islem="emailbos" Then
hata="<font color=#8E1A23>Lütfen Email Adresinizi Yazınız</font>"
end if
if islem="aciklamabos" Then
hata="<font color=#8E1A23>Lütfen Mesajınızı Yazınız.</font>"
end if
if islem="tamam" Then
hata="<font color=#8E1A23>Mailiniz için teşekkür ederiz.</font>"
end if
%>
<%
sub gonder
ad=request.form("ad")
tel=request.form("tel")
email=request.form("email")
mesaj=request.form("mesaj")
if ad="" or ad="adınız soyadınız" then
response.redirect "?islem=adbos"
end if
if tel="" or tel="telefon numaranız" then
response.redirect "?islem=telbos"
end if
if email="" or email="email adresiniz" then
response.redirect "?islem=emailbos"
end if
if mesaj="" or mesaj="açıklamanız" then
response.redirect "?islem=aciklamabos"
end if
On Error Resume Next
zaman=Now()
Set myMail=CreateObject("CDO.Message")
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.websiteadresi.com"
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = "25"
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = "0"
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "info@websiteadresi.com"
myMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "websiteadresi şifresi"
myMail.Configuration.Fields.Update
myMail.Subject= "websiteadresi.com iletişim formu" 'This is the subject of the e-mail
myMail.To="info@websiteadresi.com" 'This is the e-mail address the e-mail will be delivered to
myMail.From=Request.Form("email")
myMail.TextBody="İsim Soyisim: " & Request.Form("ad") & vbnewline & "E-Mail Address: " & Request.Form("email") & vbnewline & "Telefon: " & Request.Form("tel") & vbnewline & "Mesaj: " & Request.Form("mesaj")
myMail.Send
set myMail=nothing
Response.redirect "?islem=tamam"
end sub
%>