Tutorials Scripts Free Q&A Books


 







:שמתשמ
:המסיס
  

0 :םויה תוסינכ
37 :שדוחה תוסינכ
1 :ןיילנוא םישלוג
רחא PHP CGI ASP JavaScript Cold Fusion JSP

ASPב םיטפירקס


FormMail
םיזיע בלוח :רבחמה םש
http://www.builder.co.il :תיב-רתא

:תורעה\תויחנה
.םיצבקה יתש תא ונש

:דוק

ASP FILE
===========
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<title>Email Sent with CDONTS NewMail</title>
<script language = "JavaScript">
function SendAnother()
{
window.location = "http://nottoday/test/cdontsmailform.html"
}
</script>
</head>

<body>
<%
On Error Resume next
Dim MyMail
Set MyMail = CreateObject("CDONTS.NewMail")
MyMail.From = Request.Form("FromField")
MyMail.To = Request.Form("ToField")
MyMail.Cc = Request.Form("CcField")
MyMail.Bcc = Request.Form("BccField")
MyMail.Subject = Request.Form("SubjectField")
MyMail.BodyFormat = Request.Form("BodyFormatField")
MyMail.MailFormat = Request.Form("MailFormatField")
MyMail.Importance = Request.Form("ImportanceField")
MyMail.Body = Request.Form("BodyField")
MyMail.Send
Set MyMail = Nothing
%>
<center>
<h3> Message has been sent!
</h3>
<p></p>
<input type="button" value="Send Another" OnClick="SendAnother()">
</center>
</body>
</html>

HTML FILE
=========
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<title>A Sample Form for Sending Email Using CDONTS NewMail Object</title>
<script language="JavaScript">
// Function to make sure all required parameters are present
// before submission
function CheckSubmit()
{
if (document.mailform.FromField.value == "")
{
alert("Sender and at least one recipient must be specified.")
return
}
if (document.mailform.ToField.value == "")
{
if (document.mailform.CcField.value == "")
{
if (document.mailform.BccField.value == "")
{
alert("Sender and at least one recipient must be specified.")
return
}
}
}
document.mailform.submit()
}
</script>
</head>

<body>
<div align="center">
<h3> A Sample User Interface for Sending Email Using CDONTS NewMail Object</h3>
<P></P>
<form name="mailform" action="http://nottoday/test/cdontsmailreply.asp" method="post">

<table cellspacing="2" cellpadding="5" border="0">
<tr>
<td align="right"><font color=red>From: </font></td>
<td><INPUT maxLength=100 name=FromField size=52></td>
</tr>
<tr>
<td align="right">* <font color=red>To: </font></td>
<td><INPUT maxLength=256 name=ToField size=52></td>
</tr>
<tr>
<td align="right">* Cc: </td>
<td><INPUT maxLength=256 name=CcField size=52></td>
</tr>
<tr>
<td align="right">* Bcc: </td>
<td><INPUT maxLength=256 name=BccField size=52></td>
</tr>
<tr>
<td align="right">Subject: </td>
<td><INPUT maxLength=100 name=SubjectField size=52></td>
</tr>
<tr>
<td align="center" colspan="2">
BodyFormat: 
<select name=BodyFormatField type=select>
<option value="0"> Message contains HTML.
<option value="1" selected> Message contains plain text only.
</select>
</td>
</tr>
<tr>
<td align="center" colspan="2">
MailFormat: 
<select name=MailFormatField type=select>
<option value="0"> Use MIME format.
<option value="1" selected> Use plain text format.
</select>
</td>
</tr>
<td align="center" colspan="2">
Importance: 
<select name=ImportanceField type=select>
<option value="0"> Low importance.
<option value="1" selected> Normal importance.
<option value="2"> High importance.
</select>
</td>
</tr>
<tr>
<td align="right">Body: </td>
<td><TEXTAREA cols=40 name=BodyField rows=12></textarea> </td>
</tr>
<tr>
<td align="center" colspan="2">
<input type="button" value="Send Mail" OnClick="CheckSubmit()">  
<input type="reset" value="Reset">
</td>
</tr>
<tr>
<td align="center" colspan = "2">
* Separate multiple addresses with semi-colons
</td>
</tr>
</table>

</form>
</div>
</body>
</html>

 

הרזח >>
...