<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<title>Email to</title>
</head>

<body>

<%
If Request.Form("send")="ok" Then
name=trim(request.Form("name"))
address=trim(request.Form("address"))
phone=trim(request.Form("phone"))
fax=trim(request.Form("fax"))
email=trim(request.Form("email"))
contents=trim(request.Form("contents"))

Set mail = CreateObject("CDO.Message")
mail.Subject = "您有一封來自於Server留言" '信件標題
mail.From = "me@yahoo.com.tw" '發信人的EMAIL
mail.To = "you@yahoo.com.tw" '發送到你的email
mail.TextBody = "姓名:"&Name&"地址:"&address&"聯絡電話:"&phone&"傳真:"&fax&"電子郵件"&email&"內容:"&contents
mail.Send
%>
<script language="javascript">
alert("訊息已寄送")
location.href="mail_2003.asp"
</script>
<%
End If
%>

<FORM action="mail_2003.asp" method="POST">
<table border="0" width="100%" id="table1" style="border: 1px solid #000000; ">
<tr>
<td>
<table border="0" width="100%" id="table2">
<tr>
<td width="100">姓名:</td>
<td><input type="text" name="name" size="20" style="border: 1px solid #000000"></td>
</tr>
<tr>
<td width="100">地址:</td>
<td><input type="text" name="address" size="40" style="border: 1px solid #000000"></td>
</tr>
<tr>
<td width="100">聯絡電話:</td>
<td>
<input type="text" name="phone" size="20" style="border: 1px solid #000000"></td>
</tr>
<tr>
<td width="100">傳真:</td>
<td>
<input type="text" name="fax" size="20" style="border: 1px solid #000000"></td>
</tr>
<tr>
<td width="100">電子郵件:</td>
<td>
<input type="text" name="email" size="40" style="border: 1px solid #000000"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table border="0" width="100%" id="table3">
<tr>
<td width="100" valign="top" align="center">內容:</td>
<td><textarea rows="10" name="contents" cols="90%" style="border: 1px solid #000000"></textarea></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<input type="Hidden" name="send" value="ok">
<p align="center"><input type="submit" value="送出" name="B1"><input type="reset" value="重新設定" name="B2"></p>
</td>
</tr>
</table>
</Form>
</body>
</html>

lovean 發表在 痞客邦 PIXNET 留言(0) 人氣()