Hello someone asked me this question. They want the data to be sent in a table in the produced email. Has anyone any ideas? thanks a lot
The code below produces the email below that.
Any ideas how to improve the code so that it is formatted more better?
It goes through each item on each row. This will get very messy when it
gets to be a big order.
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
dim mail_body
mail_body = "Form submitted at "& Now() & vbCrLf & vbCrLf
dim form_element
For each FormElement in Request.Form
mail_body = mail_body & FormElement & ": " & Request.Form(FormElement) &
vbCrLf
Next
dim objCDO
set objCDO = Server.CreateObject("CDONTS.NewMail"
objCDO.to ="me@btinternet.com"
objCDO.from ="testOrder@dr.com"
objCDO.Subject = "New Order"
objCDO.Body = mail_body
objCDO.Send
set objMail = nothing
%>
<%response.Redirect("../secure/logon.asp"
%>
<html>
<head>
<title>mailer</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<p> </p>
</body>
-----Original Message-----
From: testOrder@dr.com [mailto:testOrder@dr.com]
Sent: 11 April 2003 12:21
To: me@btinternet.com
Subject: New Order
Form submitted at 11/04/03 12:21:27
OrderID: 259
item: Paracetamol, Ranitidine
form: Syrup, Tablet
size_strength: 500 mg, 150 mg
packSize: 1000, 100
hdnOrderID: 259
cost_pack: £4.00, £50.00
Cost_Item: £12.00, £200.00
quantity: 3, 4
outlet: Church Street, Church Street
staffName: a
Submit: Submit Order
totalCost: £212.00
The code below produces the email below that.
Any ideas how to improve the code so that it is formatted more better?
It goes through each item on each row. This will get very messy when it
gets to be a big order.
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
dim mail_body
mail_body = "Form submitted at "& Now() & vbCrLf & vbCrLf
dim form_element
For each FormElement in Request.Form
mail_body = mail_body & FormElement & ": " & Request.Form(FormElement) &
vbCrLf
Next
dim objCDO
set objCDO = Server.CreateObject("CDONTS.NewMail"
objCDO.to ="me@btinternet.com"
objCDO.from ="testOrder@dr.com"
objCDO.Subject = "New Order"
objCDO.Body = mail_body
objCDO.Send
set objMail = nothing
%>
<%response.Redirect("../secure/logon.asp"
<html>
<head>
<title>mailer</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<p> </p>
</body>
-----Original Message-----
From: testOrder@dr.com [mailto:testOrder@dr.com]
Sent: 11 April 2003 12:21
To: me@btinternet.com
Subject: New Order
Form submitted at 11/04/03 12:21:27
OrderID: 259
item: Paracetamol, Ranitidine
form: Syrup, Tablet
size_strength: 500 mg, 150 mg
packSize: 1000, 100
hdnOrderID: 259
cost_pack: £4.00, £50.00
Cost_Item: £12.00, £200.00
quantity: 3, 4
outlet: Church Street, Church Street
staffName: a
Submit: Submit Order
totalCost: £212.00