Thanks The code is working. However there is still one problem. The email sent is in html format and includes images within the html tables. How do I ensure that the images are sent to email addresses along with the html tables. At the moment the images are not visible. I am using Outlook express.
Any ideas? Thanks again Srimanta ----- Original Message ----- From: "Joel Nath" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Tuesday, October 01, 2002 7:11 PM Subject: RE: CF Mail Problem.. > Hi Srimanta, > > try something like... > > > <CFQUERY name= "Get_Products" DataSource="XYZ"> > Select * FROM Products WHERE product id=#Form.productid# > </CFQUERY> > > <cfmail to="#Form.Email_Address#" > from="myemail.com" > subject="Product" > type="HTML"> > <Table> > <cfloop query="Get_Products"> > > > <TR> > <TD> Productid: #Get_Products.productid# <BR> </TD> > <TD>Details: #Get_Products.details# <BR> </TD> > <TD>Model : #Get_Products.modelno# <BR> </TD> > </TR> > > > </cfloop> > </Table> > </cfmail> > > hth > joel > > > > -----Original Message----- > From: Srimanta [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, 1 October 2002 2:51 > To: CF-Talk > Subject: CF Mail Problem.. > > > Hello Forum, > > Need Help. > > I am trying to send data generated by a query using CFMAIL tag to a > recepient whose email is obtained from a Form. > However Instead of including and sending only one email containing all the > rows returned by the query to the email address obtained from the Form in > the previous page CFMAIL is sending multiple emails to the same email > address > --one email for each record generate from the query. Thus each email > contains only one seperate record. > I cant understand why? > The recepient email address comes from the Form. The contents of the email > is generated by the db query. > Any help will be much appreciated. > > This is my code: > > <CFQUERY name= "Get_Products" DataSource="XYZ"> > Select * FROM Products WHERE product id=#Form.productid# > </CFQUERY> > > <cfmail query="Get_Products" > to="#Form.Email_Address#" > from="myemail.com" > subject="Product" > > type="HTML"> > > <!--- The variables #productid# and #Email_Address# come from the Previous > Page (Form.cfm). > > <Table> > <TR> > <TD> Productid: Get_Products.productid <BR> </TD> > <TD>Details: Get_Products.details <BR> </TD> > <TD>Model : Get_Products.modelno <BR> </TD> > </TR> > </Table> > </cfmail> > > The purpose is to send more details about the product selected by the user > in the Form.cfm Page. > Thanks > > Srimanta > ----- Original Message ----- > From: "jon hall" <[EMAIL PROTECTED]> > To: "CF-Talk" <[EMAIL PROTECTED]> > Sent: Tuesday, October 01, 2002 4:13 PM > Subject: Re: Using Java nulls in CF? > > > > For anyone wondering...with smaller files it really doesn't matter, > > but with a 2.3MB IIS logfile, the Java ReadLine method is about 30-40 > > percent faster than the old standby looping over the file as a string > > using chr(10) as a delimiter. > > > > -- > > jon > > mailto:[EMAIL PROTECTED] > > > > Monday, September 30, 2002, 11:43:44 PM, you wrote: > > jh> Actually I didn't even think of using isDefined(), and I think > > jh> you answered my question without knowing it :). > > > > jh> All I really wanted to do was use java's readLine() method, but > > jh> readLine returns a null when the last line has been read. So I stuck > > jh> isDefined() in there an voila! It worked. > > > > jh> <cfscript> > > jh> fr = createObject("java", "java.io.FileReader"); > > jh> br = createObject("java", "java.io.BufferedReader"); > > jh> fr.init(filename); > > jh> br.init(fr); > > > > jh> line = br.readLine(); > > jh> while (isDefined("line")) { > > jh> writeOutput(line & '<br>'); > > jh> line = br.readLine(); > > jh> } > > > > jh> fr.close(); > > jh> br.close(); > > jh> </cfscript> > > > > > > jh> Now I'm going to see if this is any faster than looping over line > > jh> breaks in a string. I hope so after all I tried to get this to work :) > > > > > > ______________________________________________________________________ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists