arkadaşlar mail gönderirken hata veriyor.
"503 Bad sequence of commands. You must specify the recipients of a message before you can send it
Hata"
"503 Bad sequence of commands. You must specify the recipients of a message before you can send it
Hata"
Kod:
<head>
<style>
<!--
.iletisim { font-family: Tahoma; font-size: 12px; color: #666666; text-decoration:
none }
.iletisim a { font-family: Tahoma; font-size: 12px; color: #666666; text-decoration:
none }
.iletisim a:hover { font-family: Tahoma; font-size: 12px; color: #666666; text-decoration:
none }
-->
</style>
</head>
<script language="JavaScript">
function checkSubmit() {
f = document.forms['form'];
if (f.ad.value == '') alert('Lütfen Adınızı Soyadınızı Yazınız');
else if (f.tel.value == '') alert('Lütfen Telefon Numaranızı Yazınız');
else if (!emailnamecheck(document.form.email)) alert('Lütfen Email Adresinizi Yazınız.');
else if (f.mesaj.value == '') alert('Lütfen Mesajınızı Yazınız');
else return true;
return false;
}
function emailnamecheck(mailObj){
result = "";
len = mailObj.value.length;
mailuser=mailObj.value;
firststr=mailuser.substr(0,1);
if (firststr=="_" || firststr=="." || firststr=="-" || firststr>=0 || firststr<=9){
alert("E-Mail adresinizin ilk karakteri "+ firststr + ' olamaz');
return false;
}
edKey=mailuser.indexOf('@',0);
pointKey=mailuser.indexOf('.',edKey);
lastChar=mailuser.indexOf('.',len-1);
edpoint=pointKey-edKey;
if (edKey<0) {alert('@ işaretini unutunuz');
} else if (pointKey<0) {alert('E-Maildeki alan adında . koymadınız');
} else if (lastChar>0) {alert('E-Mail adresinin sonunda nokta olmaz');
} else if (edpoint<=1) {alert('nokta ve @işareti yan yana olmaz');
} else return true;
return false;
}
</script>
<%
islem=Request.Querystring("islem")
if islem="gonder" Then
call gonder
end if
%>
<%
sub gonder
ad=request.form("ad")
tel=request.form("tel")
email=request.form("email")
mesaj=request.form("mesaj")
On Error Resume Next
zaman=Now()
Message="<html><body bgcolor=#e2e2e2><font color=#D9352D face=Arial><b>"&siteadi&"</b></font><br><br><b><font face=Arial size=2 color=#3B3B3B>Adı Soyadı : </font></b><font face=Arial style=font-size: 12px></font><font color=#5C5C5C face=Arial size=2>"&ad&"</font><font face=Arial style=font-size: 12px><br></font><b><font face=Arial size=2 color=#3B3B3B>Telefon :</font></b><font face=Arial style=font-size: 12px><b> </b></font><font color=#5C5C5C face=Arial size=2>"&tel&"</font><font face=Arial style=font-size: 12px><br></font><b><font face=Arial size=2 color=#3B3B3B>E-Mail Adresi :</font></b><font face=Arial style=font-size: 12px><b> </b></font><font color=#5C5C5C face=Arial size=2>"&email&"</font><b><font face=Arial size=2 color=#3B3B3B><br></font><b><font face=Arial size=2 color=#3B3B3B><b>Mesajı </b> : </b></font><font color=#5C5C5C face=Arial size=2>"&mesaj&"</font></body></html>"
%>
<%
Set Mail = Server.CreateObject("Persits.MailSender")
Mail.Charset="windows-1254"
Mail.Host = "Localhost"
Mail.Username = adminmail
Mail.Password = mailsifre
Mail.From = adminmail
Mail.FromName = request.form("ad")
Mail.AddAddress adminmail
Mail.AddReplyTo adminmail
Mail.Subject = "İletişim Bölümünden Mesajınız Var!"
Mail.IsHTML = True
Mail.Body = Message
Mail.Send
If ERR Then
Response.Write err.Description & "<br>Hata"
Else
Response.redirect "?islem=tamam"
End If
end sub
%>
<%
if islem="" then
%>
<form style="width: 262px;" name="form" action="?islem=gonder" method="POST" onSubmit="return checkSubmit();">
<table width="316" height="167" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#111111" style="border-collapse: collapse" >
<tr>
<td class="iletisim" style="padding-top:2px;" width="141" height="12" align="left">
<b>Adınız Soyadınız</b></td>
<td class="iletisim" style="padding-top:2px;" width="175" height="12" align="left">
<input type="text" name="ad" size="18" /></td>
</tr>
<tr>
<td class="iletisim" style="padding-top:2px;" width="141" height="6" align="left">
<b>Telefon Numaranız</b></td>
<td class="iletisim" style="padding-top:2px;" width="175" height="6" align="left">
<input type="text" name="tel" size="18" /></td>
</tr>
<tr>
<td class="iletisim" style="padding-top:2px;" width="141" height="6" align="left">
<b>E-Mail Adresiniz</b></td>
<td class="iletisim" style="padding-top:2px;" width="175" height="6" align="left">
<input type="text" name="email" size="18"/></td>
</tr>
<tr>
<td style="padding-top:2px;" class="iletisim" width="141" height="56" align="left">
<b> Mesajınız</b></td>
<td style="padding-top:2px;" class="iletisim" width="175" height="56" align="left" valign="top">
<textarea rows="3" name="mesaj" cols="11" onFocus="this.value=''" value="Mesajınız" ></textarea></td>
</tr>
<tr>
<td height="42" valign="bottom" colspan="2" align="center">
<div align="right">
<table width="140" border="0" id="table1" style="border-collapse: collapse">
<tr>
<td width="70" height="42" align="center">
<input type="submit" value="Gönder" name="pbSend" style="width:65px;" style="border:1px solid #C0C0C0; color: #ffffff; font-weight: bold; background-color: #74BFD6; font-family:Lucida Console; font-size:8pt" />
</font></td>
<td width="70" align="center">
<input type="reset" value="Temizle" name="pbSend0" style="width:65px;" style="border:1px solid #C0C0C0; color: #ffffff; font-weight: bold; background-color: #74BFD6; font-family:Lucida Console; font-size:8pt" />
</font></td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</form>
<%elseif islem="tamam" then%>
<table width="296" height="37" border="0" align="center" cellpadding="0" bordercolor="#111111" style="border-collapse: collapse">
<tr>
<td width="296" height="37" align="center">
<font face="Tahoma" style="font-size: 12px">Mesajınız Elimize
Ulaşmıştır!</font><font face="Arial"><br />
</font>
<font color="#FFFFFF" face="Tahoma" style="font-size: 12px">
<b>Sizinle en yakın zamanda
iletişime geçilecektir.</b></font></td>
</tr>
</table>
<%end if%>