<%
function SendMail (mailto,mailfrom,title,content)
' On Error Resume Next
Dim objcdomail
Set Objcdomail = Server.CreateObject ("CDONTS. NewMail ")
With Objcdomail
. From =mailfrom
. To =mailto
. Subject =title
. Body =content
. BodyFormat =0
. MailFormat =0
. Send
End With
Set Objcdomail = Nothing
If Err Then
Sendmail=false
Err. Clear
Else
Sendmail=true
End If
End Function
If request. Form<> "" Then
Mailto=trim (Request.Form ("MailTo"))
Mailform=trim (Request.Form ("email"))
Title=trim (Request.Form ("title"))
Content= ""
For each mailkey in Request.Form
content=content& "<br>" & Mailkey & ":" & Trim (Request.Form (Mailkey))
Next
ElseIf request. Querystring<> "" Then
Mailto=trim (Request.QueryString ("MailTo"))
Mailform=trim (Request.QueryString ("email"))
Title=trim (Request.QueryString ("title"))
Content= ""
For each mailkey in Request.QueryString
content=content& "<br>" & Mailkey & ":" & Trim (Request.QueryString (Mailkey))
Next
Else
Response. Write ("<script language=javascript tutorial >alert (' Please send email in the correct way '); Window.close ();</script>")
Response.End
End If
' Response. Write (content)
' Response. End ()
Pdsendmail=sendmail (mailto,mailform,title,content)
If not Pdsendmail then
Response. Write ("<script language=javascript>alert (' send failed '); Window.close ();</script>")
Else
Response. Write ("<script Language=javascript>alert (' send Success '); Window.close ();</script>")
End If
%>
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<title> submit form to send mail </title>
<body>
<table width= "97%" border= "1" cellspacing= "5" cellpadding= "1" align= "center" bgcolor= "#EEFFF4" height= "630" >
<tr>
<TD height= "440" >
<form action= "sendmail.asp tutorial" target= "_blank" method=post>
<input name= "MailTo" Type=hidden value= "dayechg@163.com" >
<input name= "title" Type= "hidden" id= "title" value= "Online booking" >
<table border=0 cellpadding=9 cellspacing=0
Width= "100%" >
<tbody>
<tr>
<TD width= "44%" >
<div align=left><font size= "2" color= "#0000FF" > Name:</font> </div></td>
<TD width= "56%" >
<div align=left><font size= "2" color= "#0000FF" >
<input name= name >
</font> </div></td>
</tr>
<tr>
<TD width= "44%" >
<div align=left><font size= "2" color= "#0000FF" > Sex:</font> </div></td>
<TD width= "56%" >
<div align=left><font size= "2" color= "#0000FF" > Male
<input CHECKED
name= sex Type=radio value= male >
Woman
<input name= Sex
Type=radio value= Female >
</font> </div></td>
</tr>
<tr>
<TD width= "44%" >
<div align=left><font size= "2" color= "#0000FF" > Age:</font> </div></td>
<TD width= "56%" >
<div align=left><font size= "2" color= "#0000FF" >
<input Name= Age >
*</font> </div></td>
</tr>
<tr>
<TD width= "44%" >
<div align=left><font size= "2" color= "#0000FF" > Tel:</font> </div></td>
<TD width= "56%" >
<div align=left><font size= "2" color= "#0000FF" >
<input Name= Tel >
*</font> </div></td>
</tr>
<tr>
<TD width= "44%" >
<div align=left><font size= "2" color= "#0000FF" class= "unnamed1" >E-mail:</font> </div></ Td>
<TD width= "56%" >
<div align=left>
<p class= "unnamed1" ><font size= "2" color= "#0000FF" >
<input name=email>
* </font> </p>
</div></td>
</tr>
<tr>
<TD width= "44%" ><font size= "2" color= "#0000FF" > Booking:</font></td>
<TD width= "56%" > <font size= "2" color= "#0000FF" >
<input name= booking id= "booking" value= "Please enter details" >
</font><font color= "#0000FF" > </font></td>
</tr>
<tr>
<TD width= "44%" >
<div align=left><font size= "2" color= "#0000FF" > Set meal:</font> </div></td>
<TD width= "56%" >
<div align=left><font size= "2" color= "#0000FF" >
<input name= Meal id= "order" value= "Please enter details" >
</font> </div></td>
</tr>
<tr>
<TD width= "44%" class= "unnamed1" ><font color= "#0000FF" > Stationary transportation:</font></td>
<TD width= "56%" ><font size= "2" color= "#0000FF" >
<input name= Transport id= "fixed means of transport" value= "Please enter details" >
</font></td>
</tr>
<tr>
<TD width= "44%" class= "unnamed1" ><font color= "#0000FF" > Reservation:</font></td>
<TD width= "56%" ><font size= "2" color= "#0000FF" >
<input name= id= "booking" value= "Please enter details" >
</font></td>
</tr>
<tr>
<TD class= "unnamed1" ><font color= "#0000FF" > Set guide:</font> </td>
<td><font size= "2" color= "#0000FF" >
<input name= Guide Id= "Set the Guide" value= "Please enter the guide you want to set the conditions" >
</font> </td>
</tr>
<tr>
<TD class= "unnamed1" ><font color= "#0000FF" > Hotel:</font></td>
<td><font size= "2" color= "#0000FF" >
<input name= Hotel id= "Ding Hotel" value= "Please enter the details" >
</font></td>
</tr>
<tr>
<TD colspan=2>
<div align=center><font size= "2" color= "#0000FF" >
<input name=submit type=submit value= Confirmation >
<input name=reset type=reset value= cancellation >
</font> </div></td>
</tr>
</tbody>
</table>
<p> </p>
</form></td>
</tr>
</table>
</body>