473,500 Members | 1,753 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

html message help

hi i am trying to send a html message that reiterates a invoice from a
online store site im making, i have the invoice written to the browser
but i would also like to send one to the customer via email

here is the code for the browser part
dim strSessionID, strISBN, strTitle

'open database for cart
strSQL = "SELECT tblCart.strSessionID, tblCart.strISBN, tblCart.intQty,
tblBookDescription.strTitle, tblBookDescription.dblPrice " & _
"FROM (tblBookDescription INNER JOIN tblCart ON
tblBookDescription.ISBN = tblCart.strISBN) "
objRS.Open strSQL, objConn

strISBN = objRS("strISBN")
strTitle = objRS("strTitle")
strSessionID = objRS("strSessionID")
%>
<center><font face='Comic Sans MS' color='#FF0000'>Order
Confirmation</font><br><br>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="600">
<tr>
<td width="159" valign="top"><font face="Comic Sans MS">Books
Shipped:</font></td>
<td width="437">
<%
'List each item in cart
dim intCount
do while NOT objRS.EOF
intCount = intCount + 1

%>
<tr>
<td valign="top" width="20" ><% =intCount %>.</td>
<td valign="top" width="256">
<! Book Title, author, stock >
<% dim Quan
If objRS("intQTY") = 1 then
Quan = "1 Copy of "
else if objRS("intQTY") > 1 then
Quan = objRS("intQTY") & " Copies of "
end if
end if
%>
<%=Quan%><br>
<font face="Comic Sans MS" color="#006699"><%
=objRS("strTitle")%></font>
<br>

<font size="-1">
by <% =funListAuthors(objRS("strISBN")) %></a>
</font>
<br>
<br>
</tr>
<% objRS.MoveNext
loop

objRS.close

dim strSQLOrder, iCount
'write order info to database

strSQLOrder = "SELECT tblOrders.strEmail, tblOrders.ISBN,
tblOrders.dtOrderDate " & _
"FROM tblOrders "
set objRS = Server.Createobject("ADODB.Recordset")
objRS.open strSQLOrder, objConn, ,adLockOptimistic
'response.write "strSQL:" & strSQL & "<br>"
For iCount= 1 to intCount

objRS.addnew
objRS("strEmail") = strEmail
objRS("dtOrderDate") = Now()
objRS("ISBN") = strISBN
objRS.update
objRS.movenext
Next
objRS.close

%>
<br>
</td>
</tr>
<tr>
<td width="159" valign="top"><font face="Comic Sans MS">Shipping
Address:</font></td>
<td width="437"><% =strFirstName & " " & strLastName & "<br>" &
strAddress & "<br>" & strCity & ", " & strState & ", " & strZip &
"<br><br>"%>

</td>
</tr>
<tr>
<td width="159" valign="top"><font face="Comic Sans
MS">Total:</font></td>
<% dim TotalPrice
TotalPrice = Request.cookies("TotalPrice")

response.write("<td width='437'>$" & TotalPrice)
i want the html message to go through the cart and list all the items
in the cart, right now i can only get it to list the first item in the
cart, i cant get the second, third, etc

here is the code for the html message

'assign the email message body to a variable
Dim strHTMLMessage
strHTMLMessage = "<a
href='http://yorktown.cbe.wwu.edu/06Winter/levini/A07/default.asp'> " &
_
"<img
src='http://yorktown.cbe.wwu.edu/06Winter/levini/images/logo.jpg'
border='0' alt='NetBooks Logo'> " &_
"</a><br> " &_
"<center><font face='Comic Sans MS'
color='#FF0000'>Order Confirmation</font><br><br> " & _
"<div align='center'> " & _
"<center> " & _
"<table border='0' cellpadding='0' cellspacing='0'
width="'600'> "
strHTMLMessage = strHTMLMessage & "<tr> " & _
"<td width='159' valign='top'><font face='Comic Sans
MS'>Books Shipped:</font></td>" & _
"<td width='437'> " & strTitle & _
"</td> " & _
"</tr> " & _
"<tr> " & _
"<td width='159' valign='top'><font face='Comic Sans
MS'>Shipping Address:</font></td> " & _
"<td width='437'>" & strFirstName & " " & strLastName
& "<br>" & strAddress & " <br>" & strCity & ", " & strState & ", " &
strZip & "<br><br>" & _
"</td> " & _
"</tr> " & _
"<tr> " & _
"<td width='159' valign='top'><font face='Comic Sans
MS'>Total:</font></td> " & _
"<td width='437'>$" & TotalPrice

'Create the mail object
Dim objMail
Set objMail = Server.CreateObject("CDO.Message")

'Set mail object properties
objMail.To = strEmail
objMail.From = "le****@cc.wwu.edu"
objMail.Subject = "Order Confirmation from NetBooks"

objMail.HTMLBody = strHTMLMessage 'your HTML email message

'Optional properties
'objMail.TextBody = "Your email message in plain text for email clients
that do not support HTML"
'objMail.CC = "cs******@wwu.edu"
'objMail.BCC = "ch***********@wwu.edu"

'Optional importance
'objMail.Fields("urn:schemas:httpmail:importance") .Value = 2
'objMail.Fields.Update()

'Send the email
objMail.Send
thanks for the help

Mar 12 '06 #1
2 1273
can anybody help me with this

Mar 13 '06 #2

"isaac2004" <is********@yahoo.com> wrote in message
news:11**********************@i39g2000cwa.googlegr oups.com...
can anybody help me with this


http://msdn.microsoft.com/library/de..._cdosys_vb.asp
Mar 13 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
3785
by: Rainmaker | last post by:
Greetings, I have not been able to find the documentation that will allow me to insert php code inside the html code in the $message block in the mail() function. Using the example in the help...
0
9856
by: James Hong | last post by:
Help please, I try to sending an email from my html page using the java applet. but it give error on most of the PC only very few work, what is the error i make the java applet show as below ...
1
2052
by: flupke | last post by:
Hi, i'm trying to convert my java console app to a python gui. Now, the only problem i seem to have at the moment are the resizers for the layout. It seems that for the purpose of what i'm...
12
6505
by: Kevin Lyons | last post by:
Hello, I am trying to get my select options (courses) passed correctly from the following URL: http://www.dslextreme.com/users/kevinlyons/selectBoxes.html I am having difficulty getting the...
23
2548
by: Charles Law | last post by:
Does anyone have a regex pattern to parse HTML from a stream? I have a well structured file, where each line is of the form <sometag someattribute='attr'>text</sometag> for example <SPAN...
5
2608
by: BaWork | last post by:
I have a web form where a client can select which site members to send an email to. This form is populated from the contents of the member table, so the form can have 0-x names listed on it...
7
3626
by: majid | last post by:
I want write a program with c# to pars a html file how ccan i do this with system.mshtml? or there is other way to do it p;ease help me?
5
15800
by: David Elliott | last post by:
I need a control on a Web Page that can accept an HTML Document and will display it. Any help would be appreciated. Thanks, Dave Here is what I was trying...
6
5474
by: Paolo Pignatelli | last post by:
I have an aspx code behind page that goes something like this in the HTML view: <asp:HyperLink id=HyperLink1 runat="server" NavigateUrl='<%#"mailto:" &amp;...
13
31354
by: =?Utf-8?B?S2VzdGZpZWxk?= | last post by:
Hi Our company has a .Net web service that, when called via asp.net web pages across our network works 100%! The problem is that when we try and call the web service from a remote machine, one...
0
7149
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7021
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7207
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7242
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6914
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
4619
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3114
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3112
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
318
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.