<!--form sayfası kodları-->
<html>
<head>
<title>Message</title>
' Coding By Thomas Keatings
' All components of this website are subject to copyright
' For permission and advice on using this code contact admin@neonred.co.uk
<style type="text/css">
<!--
.style1 {
color: #FFFFFF;
font-weight: bold;
}
-->
</style>
</head>
<body>
<form method="POST" action="send_mail.asp">
<table width="427" border="1" align="center" cellpadding="3" cellspacing="0" bordercolor="#990000">
<tr bordercolor="#CC0000" bgcolor="#990000">
<td colspan="2"><div align="center"><span class="style5 style1 style1">Contact Form </span></div></td>
</tr>
<tr bordercolor="#990000" bgcolor="#FFFFCE">
<td width="150"><div align="right"><span class="style4">Your Name:</span></div></td>
<td width="259"><input name="txtName" type="text" id="txtName" size="35"></td>
</tr>
<tr bordercolor="#990000" bgcolor="#FFFFCE">
<td><div align="right"><span class="style4">Your Email Address:</span></div></td>
<td><input name="txtEmail" type="text" id="txtEmail" size="35"></td>
</tr>
<tr bordercolor="#990000" bgcolor="#FFFFCE">
<td><div align="right"><span class="style4">Reason you are contacting me: </span></div></td>
<td><select name="lstReason" id="lstReason">
<option>Regarding this Website</option>
<option>Feedback</option>
<option>Other</option>
</select></td>
</tr>
<tr bordercolor="#990000" bgcolor="#FFFFCE">
<td><div align="right"><span class="style4">Comment:</span></div></td>
<td><textarea name="txfComments" cols="35" rows="6" id="txfComments"></textarea></td>
</tr>
<tr bordercolor="#990000" bgcolor="#FFFFCE">
<td colspan="2"><div align="center"><font face="Verdana" size="1"><br>
Please double check for spelling errors before submitting your details. <br>
<br>
<input type="submit" name="Submit" value="Submit Form">
<input type="reset" name="Submit2" value="Reset Form">
</font></div></td>
</tr>
</table>
</form>
</body>
</html>
<!---sen_mail.asp kodları-->
<%@LANGUAGE="VBSCRIPT"%>
<% Option Explicit %>
<%
' Coding By Thomas Keatings
' All components of this website are subject to copyright
' For permission and advice on using this code contact admin@neonred.co.uk
'Create the variables
DIM strName, strUserEmail, strReason, strComments
'request the required information from the form and place them in the variables
strName = request.form("txtName")
strUserEmail =request.form("txtEmail")
strReason =request.form("lstReason")
strComments =request.form("txfComments")
DIM SendMail
'Define the email type
Set SendMail = Server.CreateObject("SMTPsvg.Mailer")
'Enter a title for the form
SendMail.FromName = "Your Title"
'Enter your email address, this is the address which will appear in the form componet of the email
SendMail.FromAddress= "you@yourdomain.com"
SendMail.ReplyTo = strUserEmail
'Enter your domain name, ie: neonred.co.uk
SendMail.RemoteHost = "yourdomain.co.uk"
'Enter your name and email address
SendMail.AddRecipient "Your Name", "you@yourdomain.com"
'Enter a subject for the email message
SendMail.Subject = "Enter a subject here"
'Build the body of the email using the data stired in the variable
SendMail.BodyText = "This is an email generated by your online form."& vbCrLf & vbCrLf & _
"Name: " & strName & vbCrLf & _
"Email Address: " & strEmail & vbCrLf & _
"Reason For Contacting: " & strReason & vbCrLf & _
"Comments: " & strComments
IF BodyText.SendMail THEN
'If the message was sent correctly tell the user
Response.Write strName & ",<br>"
Response.Write "Your message has been sent."
ELSE
'If the message wasn't sent correctly tell the user
Response.Write "An error occure while trying to send your email: " & SendMail.Response
END IF
%>