Form.html
کد:
<form action=sendmail.asp method=post>
Your Full Name : <input type=text name="name>" <br>
Your E-mail : <input type=text name="email>" <br>
Your Comments: <textarea name=""comments"" cols="22" rows="5"></textarea> <br>
<input type=submit value=submit> <br>
</form>
sendmail.asp
کد:
<%
Body ="Name : " & request.form("name") & vbCrLf _
& "E-Mail : " & request.form("email") & vbCrLf _
& "Comments : " & request.form("commentsl") & vbCrLf _
& Trim(strMessage)
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Online Contact From Website"
fromname=""Domain" WebContact"
emailfrom="[email protected]"
objMessage.From = fromname & " <" & emailfrom & ">"
objMessage.To = "[email protected]"
objMessage.TextBody = Body
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.yourdomain.com"
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objMessage.Configuration.Fields.Update
objMessage.Send
%>
<p>Thank you for filling contact form</P>
faghat tavajoh kon
emailfrom="
[email protected]" ro bayad emailo khodet ro bezanni , va emaili bashe ke dar site sakhte shodeh bashe ! yani pop3
objMessage.To = "
[email protected]"
inja ham har email mitooni bezani , etelaat be in email mireh
soali dashti dar khedmatim