473,830 Members | 2,086 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.strSess ionID, tblCart.strISBN , tblCart.intQty,
tblBookDescript ion.strTitle, tblBookDescript ion.dblPrice " & _
"FROM (tblBookDescrip tion INNER JOIN tblCart ON
tblBookDescript ion.ISBN = tblCart.strISBN ) "
objRS.Open strSQL, objConn

strISBN = objRS("strISBN" )
strTitle = objRS("strTitle ")
strSessionID = objRS("strSessi onID")
%>
<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"><f ont 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("strTitl e")%></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.strEm ail, tblOrders.ISBN,
tblOrders.dtOrd erDate " & _
"FROM tblOrders "
set objRS = Server.Createob ject("ADODB.Rec ordset")
objRS.open strSQLOrder, objConn, ,adLockOptimist ic
'response.write "strSQL:" & strSQL & "<br>"
For iCount= 1 to intCount

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

%>
<br>
</td>
</tr>
<tr>
<td width="159" valign="top"><f ont 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"><f ont 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.ww u.edu/06Winter/levini/A07/default.asp'> " &
_
"<img
src='http://yorktown.cbe.ww u.edu/06Winter/levini/images/logo.jpg'
border='0' alt='NetBooks Logo'> " &_
"</a><br> " &_
"<center><f ont 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'><f ont face='Comic Sans
MS'>Books Shipped:</font></td>" & _
"<td width='437'> " & strTitle & _
"</td> " & _
"</tr> " & _
"<tr> " & _
"<td width='159' valign='top'><f ont 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'><f ont face='Comic Sans
MS'>Total:</font></td> " & _
"<td width='437'>$" & TotalPrice

'Create the mail object
Dim objMail
Set objMail = Server.CreateOb ject("CDO.Messa ge")

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

objMail.HTMLBod y = strHTMLMessage 'your HTML email message

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

'Optional importance
'objMail.Fields ("urn:schemas:h ttpmail:importa nce").Value = 2
'objMail.Fields .Update()

'Send the email
objMail.Send
thanks for the help

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

Mar 13 '06 #2

"isaac2004" <is********@yah oo.com> wrote in message
news:11******** **************@ i39g2000cwa.goo glegroups.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
3800
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 file: <?php /* recipients */ $to = "valid@email.add" . ", " ; // note the comma $to .= $_POST;
0
9879
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 ********************************** package Celcom.Client;
1
2074
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 trying to do, specifying the coordinates is easier that fighting with the layout resizers. 1) I have a screen split in 2. Left side is a textcontrol where logging will end up. All text will be appended to the textcontrol. Ideally this should allow...
12
6565
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 courses to pass the correct option value and then be displayed at the following URL: http://www.dslextreme.com/users/kevinlyons/selectResults.html I am passing countries, products, and courses. The first two display
23
2594
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 CLASS='myclass'>A bit of text</SPAN>, or Just some text, without tags
5
2641
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 depending on member expiration dates. When the form is submitted, the code loops through the form contents and sends an email to those members that meet the selected criteria. All this worked perfectly when I was sending text emails, but since I
7
3650
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
15823
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
5528
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; DataBinder.Eval(Container.DataItem,"StoreEmail") &amp; "&amp;Subject=" &amp; DataBinder.Eval(Container.DataItem,"ProductName") ....
13
31445
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 outside of our domain, we get the error.. ** Client found response content type of 'text/html; charset=Windows-1252', but expected 'text/xml' **. We can discover the web service by typing in the url of the asmx so we know the server can 'see' it...
0
9642
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10481
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10524
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10199
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9312
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5616
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5779
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4409
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3956
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.