您好我在下面列出了html,我不知道如何通过电子邮件将其创建的表单数据发送到我们的Exchange内联网上的地址。我知道这可能是一件容易的事情,但我只是弄湿了编程,这一直到目前为止我的头脑。我可以提交它创建的表单代码,如果需要我只是不想用代码填充问题帖子。感谢任何慷慨帮助的人。
<html>
<head>
<title>Store Room Parts Request Form</title>
</head>
<body>
<Form action="completedform.asp" method="post" name="PartReq">
<%
'declare the variables
Dim Connection
Dim ConnString
Dim Recordset
Dim SQL
Stknum = request.querystring("stkn")
'define the connection string, specify database driver
ConnString="DRIVER={SQL Server};SERVER=oursever"
'declare the SQL statement that will query the database
SQL = "Select stockno, description, partno, ttl_oh, ext_description, rec_supplier, mstr_locn from our server where stockno = '" & Stknum & "'"
'create an instance of the ADO connection and recordset objects
Set Connection = Server.CreateObject("ADODB.Connection")
Set Recordset = Server.CreateObject("ADODB.Recordset")
'Open the connection to the database
Connection.Open ConnString
'Open the recordset object executing the SQL statement and return records
Recordset.Open SQL,Connection
%>
<input type="hidden" name="StkNumber" value="<%Response.Write Stknum %>">
<table width=720 cellpadding="1" border="0">
<tr>
<td align='center'><img align='center' src="/images/pretty.jpg" width="190" height="35" border="0"></td>
</tr>
<tr>
<td align='center' style="font-size: 18pt">Store Room Parts Request</td>
</tr>
<tr>
<td align='center' style="font-size: 10pt"><%response.write(now())%></td>
</tr>
</table>
<table width=720 cellpadding="0" border="0">
<tr>
<td>
<table width=350 cellpadding="1" border="0">
<tr>
<td valign="top" width=60>Stock #:</td>
<td width=264 valign="top" style='border-left:.5pt solid black;border-top:.5pt solid black;border-bottom:.5pt solid black;border-right:.5pt solid black'>
<%
If Recordset("stockno") = "" then
Response.Write " "
Else
Response.Write Recordset("stockno")
End if
%>
</td>
</tr>
<tr>
<td valign="top" width=60>Desc:</td>
<td width=264 valign="top" style='align-items:flex-start;height: 190px;border-left:.5pt solid black;border-top:.5pt solid black;border-bottom:.5pt solid black;border-right:.5pt solid black'>
<%
If Recordset("description") = "" then
Response.Write " "
Else
Response.Write Recordset("description")
End if
%>
</td>
</tr>
<tr>
<td valign="top" width=60>Part #:</td>
<td width=264 valign="top" style='border-left:.5pt solid black;border-top:.5pt solid black;border-bottom:.5pt solid black;border-right:.5pt solid black'>
<%
If Recordset("partno") = "" then
Response.Write " "
Else
Response.Write Recordset("partno")
End if
%>
</td>
</tr>
<tr>
<td valign="top" width=60>On Hand:</td>
<td width=264 valign="top" style='border-left:.5pt solid black;border-top:.5pt solid black;border-bottom:.5pt solid black;border-right:.5pt solid black'>
<%
If Recordset("ttl_oh") = "" then
Response.Write " "
Else
Response.Write Recordset("ttl_oh")
End if
%>
</td>
</tr>
<tr>
<td valign="top" width=60>Ext Desc:</td>
<td width=264 valign="top" style='height: 100px;border-left:.5pt solid black;border-top:.5pt solid black;border-bottom:.5pt solid black;border-right:.5pt solid black'>
<%
If Recordset("ext_description") = "" then
Response.Write " "
Else
Response.Write Recordset("ext_description")
End if
%>
</td>
</tr>
<tr>
<td valign="top" width=60>Supplier:</td>
<td width=264 valign="top" style='border-left:.5pt solid black;border-top:.5pt solid black;border-bottom:.5pt solid black;border-right:.5pt solid black'>
<%
If Recordset("rec_supplier") = "" then
Response.Write " "
Else
Response.Write Recordset("rec_supplier")
End if
%>
</td>
</tr>
<tr>
<td valign="top" width=60>Bin:</td>
<td width=264 valign="top" style='border-left:.5pt solid black;border-top:.5pt solid black;border-bottom:.5pt solid black;border-right:.5pt solid black'>
<%
If Recordset("mstr_locn") = "" then
Response.Write " "
Else
Response.Write Recordset("mstr_locn")
End if
%>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<%
Recordset.Close
Connection.Close
Set Recordset = Nothing
Set Connection = Nothing
%>
<table width=720 cellpadding="4" border="0">
<tr>
<td>Name: <input type="text" name="RequestBy" size="75" maxlength="75"></td>
<td>Badge #: <input type="text" name="Badge" size="10" maxlength="10"></td>
</tr>
<tr>
<td>Email: <input type="text" name="Email" size="75" maxlength="75"></td>
</tr>
</table>
<table width=720 cellpadding="4" border="0">
<tr>
<td width=125>Quantity Requested:</td><td><input type="text" name="NumReq" size="40" maxlength="40"></td>
</tr>
<tr>
<td width=125>Date Needed:</td><td><input type="text" name="Date" size="15" maxlength="15" Value="MM/DD/YYYY"></td>
</tr>
</table>
<table width=720 cellpadding="4" border="0">
<tr>
<td width=225>Work Order #: <input type="text" name="WO" size="10" maxlength="10"></td><td width=50> (or) </td>
<td width=400>Account #: <input type="text" name="Acc" size="10" maxlength="10"> (and) Cost Center: <input type="text" name="CC" size="10" maxlength="10"></td>
</tr>
</table>
<table width=720 cellpadding="4" border="0">
<tr>
<td>Choose One: <input type="radio" name="PD" value="Pick-Up" checked>Pick-Up <input type="radio" name="PD" value="Delivery">Delivery</td>
<td colspan="2">If Delivery, Where to: <select name="Department" id="Department">
<option>                                                      </option>
<option>place1</option>
<option>place2</option>
<option>place3</option>
<option>shire</option>
<option>mordor</option>
<option>end of the earth</option>
</select>
</td>
</tr>
</table>
<table width=720 cellpadding="4" border="0">
<tr>
<td>Comments:<br>
<textarea name="Comments" rows="4" cols="86"></textarea></td>
</tr>
</table>
<table width=720 cellpadding="4" border="0">
<tr>
<td><input type="submit" value="Submit"></td>
</tr>
</table>
<table width=720 cellpadding="0" border="0">
<tr>
<td><hr></td>
</tr>
<tr>
<td>Completed by Store Room Personal only:</td>
</tr>
</table>
<table width=720 cellpadding="0" border="0">
<tr>
<td width=112>Quantity Issued:</td><td width=264 style='border-bottom:.5pt solid black'> </td>
</tr>
<tr>
<td width=112>Quantity Ordered:</td><td width=264 style='border-bottom:.5pt solid black'> </td>
</tr>
<tr>
<td colspan="2"><hr></td>
</tr>
<tr>
<td width=112>Received By:</td><td width=264 style='border-bottom:.5pt solid black'> </td>
</tr>
<tr>
<td width=112>Date Received:</td><td width=264 style='border-bottom:.5pt solid black'> </td>
</tr>
</table>
</body>
</html>