RE: CF Mail Problem..

2002-10-03 Thread Bud

On 10/1/02, Ryan Sabir penned:
>Thats how CFMAIL is supposed to work when you pass a query to it.
>
>What you should do is use a  inside your
>CFMAIL content section to output the data you need in the table.
>
>bye!

That depends. If you have a cfouput nested in the cfmail, it 
shouldn't. Or at least it never has in the past.


SELECT category_name
FROM categories
order by category_id


The cfmail below will send an e-mail for each category.


#category_name#


In CF 4.0, 4.5 and 5, the cfmail below will send a single e-mail 
containing all categories.


#category_name#


I'm having a similar problem and found the thread started by Srimanta 
while looking to see if anyone else had similar problems. My shopping 
cart sends out an e-mail confirmation based on the shopper's cart 
after an order is placed. The code below (simplified) has worked fine 
for 3 years since version 4.0.


Thank you for your purchase, order number #Order_ID#.

Product Name: #Item_Name#
Product ID: #Item_ID#
Item Price: #dollarformat(Item_Price)#
Qty Purchased: #Quantity#
Item Total: #dollarformat(Quantity * Item_Price)#
___

Total: #dollarformat(Order_Total)#


Now, with CFMX, if the shopper has 4 items in their basket it sends 
out 4 e-mails.

1st mail contains 1st item
2nd mail contains 1st 2 items
3rd mail contains 1st 3 items
4th mail contains all 4 items correctly.


Now, I love CF, but I'm really getting sick of going back to every 
application I've built to fix things every time a new version of CF 
comes out, and having to write the same code 3 and 4 different ways 
with a version switch so the proper code loads depending upon the 
version of CF that's running when building a new app. One of the 
advantages of using CF has always been quicker development time. That 
advantage is quickly defeated when I have to write the same code 3 
times so my program will run on 4.0, 4.5, 5 and MX.

Examples:
1) cflock. Have to place a version switch in every application, then 
cfinclude 2 different sets of files for every session, server and 
application variable written and read. One using "name" for 4.0, one 
using "scope" for 4.5 and higher. How I would have done it? Write 4.5 
and higher so if name and scope were both included, name would be 
ignored. Issue a patch for 4.0 so including scope wouldn't throw an 
error.

2) cfmail. Have to place a version switch in every application, then 
cfinclude 2 different sets of files for every cfmail containing 
cfoutput. One with cfprocessingdirective suppresswhitespace="no" for 
4.5 and higher, one without for 4.0. I NEVER had a problem with 
excess white space in cfmail using 4.0. How I would have done it? The 
automatic white space cleanup would have been written to leave cfmail 
alone. Then we would could add suppresswhitespace="yes" if need be. 
Either that or issue a patch for 4.0 where using 
cfprocessingdirective wouldn't throw an error.

3) cfhttp POST. Have to place a version switch every time I use 
cfhttp, then manually URLEncode any variables that should be encoded 
in 4.5 and earlier, which is fine and the way it should be. But now I 
have to go back and set all URLEncoded variables outside of the 
chfhttp tag, and either encode them for version 4.5 and earlier, or 
pass them as they are form 5 and later. Still haven't figured out 
what to do in 5 and higher when you don't WANT to send the value 
encoded. How I would have done it? Just leave the darned thing the 
way it was. That's why they made URLEncodedFormat() in the first 
place. Let they developers decide if we want to encode the values.

4) Grouped queries. They totally changed the way currentrow is 
calculated on grouped queries. I wrote a little tag that let's you do 
Next'n records on a grouped cfoutput. CFMX totally broke it and I had 
to put a version switch in it. Again, I would have left this alone.

5) Now this new one. I'll have to go back and add a THIRD cfinclude 
just to use cfmail with a query and nested cfoutput.

And I'm just beginning to test things with CFMX. I can only imagine 
what other problems I'll run into. Utterly ridiculous!


Sorry about the rant. It's early and I hate finding new bugs first 
thing in the morning. :)
-- 

Bud Schneehagen - Tropical Web Creations

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
ColdFusion Solutions / eCommerce Development
[EMAIL PROTECTED]
http://www.twcreations.com/
954.721.3452
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.



Re: CF Mail Problem..

2002-10-01 Thread Srimanta

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...
>
>
> 
> Select * FROM Products WHERE product id=#Form.productid#
> 
>
>  from="myemail.com"
> subject="Product"
>   type="HTML">
>  
> 
>
>
> 
>Productid: #Get_Products.productid#   
>   Details: #Get_Products.details#   
>   Model : #Get_Products.modelno#   
> 
>
>
> 
> 
>  
>
> 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:
>
> 
> Select * FROM Products WHERE product id=#Form.productid#
> 
>
>  to="#Form.Email_Address#"
> from="myemail.com"
> subject="Product"
>
>   type="HTML">
>
>  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> 
> > 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 & '');
> > jh> line = br.readLine();
> > jh> }
> >
> > jh> fr.close();
> > jh> br.close();
> > jh> 
> >
> >
> > 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



RE: CF Mail Problem..

2002-09-30 Thread Joel Nath

Hi Srimanta,

try something like...



Select * FROM Products WHERE product id=#Form.productid#



 




 Productid: #Get_Products.productid#   
Details: #Get_Products.details#   
Model : #Get_Products.modelno#   





 

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:


Select * FROM Products WHERE product id=#Form.productid#




  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> 
> 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 & '');
> jh> line = br.readLine();
> jh> }
>
> jh> fr.close();
> jh> br.close();
> jh> 
>
>
> 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 :)
>
>

__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.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



Re: CF Mail Problem..

2002-09-30 Thread Srimanta

Hi Sabir
Many Thanks Mate..
It Works
S..

- Original Message -
From: "Ryan Sabir" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, October 01, 2002 6:25 PM
Subject: RE: CF Mail Problem..


> Thats how CFMAIL is supposed to work when you pass a query to it.
>
> What you should do is use a  inside your
> CFMAIL content section to output the data you need in the table.
>
> bye!
>
>
> ---
> Ryan Sabir
> Newgency Pty Ltd
> 2a Broughton St
> Paddington 2021
> Sydney, Australia
> Ph (02) 9331 2133
> Fax (02) 9331 5199
> Mobile: 0411 512 454
> http://www.newgency.com/index.cfm?referer=rysig
>
> > -Original Message-
> > From: Srimanta [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, 1 October 2002 2:51 PM
> > 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:
> >
> > 
> > Select * FROM Products WHERE product id=#Form.productid#
> > 
> >
> >  > to="#Form.Email_Address#"
> > from="myemail.com"
> > subject="Product"
> >
> >   type="HTML">
> >
> >  > 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> 
> > > 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 & '');
> > > jh> line = br.readLine();
> > > jh> }
> > >
> > > jh> fr.close();
> > > jh> br.close();
> > > jh> 
> > >
> > >
> > > 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 :)
> > >
> > >
> >
> 
__
Get the mailserver that powers this list at http://www.coolfusion.com
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



RE: CF Mail Problem..

2002-09-30 Thread Ryan Sabir

Thats how CFMAIL is supposed to work when you pass a query to it.

What you should do is use a  inside your
CFMAIL content section to output the data you need in the table.

bye!


---
Ryan Sabir
Newgency Pty Ltd
2a Broughton St
Paddington 2021
Sydney, Australia
Ph (02) 9331 2133
Fax (02) 9331 5199
Mobile: 0411 512 454
http://www.newgency.com/index.cfm?referer=rysig

> -Original Message-
> From: Srimanta [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, 1 October 2002 2:51 PM
> 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:
>
> 
> Select * FROM Products WHERE product id=#Form.productid#
> 
>
>  to="#Form.Email_Address#"
> from="myemail.com"
> subject="Product"
>
>   type="HTML">
>
>  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> 
> > 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 & '');
> > jh> line = br.readLine();
> > jh> }
> >
> > jh> fr.close();
> > jh> br.close();
> > jh> 
> >
> >
> > 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 :)
> >
> >
> 
__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
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



Re: CF Mail problem sending multiple times

2002-08-16 Thread Neil H.

The problem eventually handles itself but sometimes it repeats emails 20
times other times 108 times :(

Neil

- Original Message -
From: <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, August 16, 2002 11:50 AM
Subject: RE: CF Mail problem sending multiple times


> I've seen this once or twice and could not figure out why it was doing
it...
> But cycling CF made it stop.
>
> -Cameron
>
> -
> Cameron Childress
> Sumo Consulting Inc.
> ---
> cell:  678-637-5072
> aim:   cameroncf
> email: [EMAIL PROTECTED]
>
>
> > -Original Message-
> > From: Neil H. [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, August 16, 2002 11:13 AM
> > To: CF-Talk
> > Subject: CF Mail problem sending multiple times
> >
> >
> > Has anyone seen This problem:
> >
> >
> > "Warning","1288","08/15/02","18:35:41",,"Unable to move the
> > spooled mail
> > file, C:\CFusion\Mail\spool\BC91.cfmail. The process cannot
> > access the file
> > because it is being used by another process.."
> >
> > It is causing emails to be sent out over and over again
> > because the file
> > can't be removed from the spool directory.
> >
> > I am NOT running any Antivirus program on this machine.
> >
> > Thanks,
> >
> > Neil
> >
> >
> >
> 
__
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



RE: CF Mail problem sending multiple times

2002-08-16 Thread cameronc

I've seen this once or twice and could not figure out why it was doing it...
But cycling CF made it stop.

-Cameron

-
Cameron Childress
Sumo Consulting Inc.
---
cell:  678-637-5072
aim:   cameroncf
email: [EMAIL PROTECTED]


> -Original Message-
> From: Neil H. [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 16, 2002 11:13 AM
> To: CF-Talk
> Subject: CF Mail problem sending multiple times
>
>
> Has anyone seen This problem:
>
>
> "Warning","1288","08/15/02","18:35:41",,"Unable to move the
> spooled mail
> file, C:\CFusion\Mail\spool\BC91.cfmail. The process cannot
> access the file
> because it is being used by another process.."
>
> It is causing emails to be sent out over and over again
> because the file
> can't be removed from the spool directory.
>
> I am NOT running any Antivirus program on this machine.
>
> Thanks,
>
> Neil
>
>
> 
__
Get the mailserver that powers this list at http://www.coolfusion.com
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



RE: CF Mail problem sending multiple times

2002-08-16 Thread Philip Arnold - ASP

> "Warning","1288","08/15/02","18:35:41",,"Unable to move the
> spooled mail file, C:\CFusion\Mail\spool\BC91.cfmail. The
> process cannot access the file because it is being used by
> another process.."
>
> It is causing emails to be sent out over and over again
> because the file can't be removed from the spool directory.

I've seen this happen on occasions when CF tries to do it's scheduled
mail send, and catches itself building a file, causing it to get "stuck"

Check it's NT status, it might have gotten to be Read Only, if so, turn
that off

> I am NOT running any Antivirus program on this machine.

Your choice, matey  Can I upload a few EXE's to the machine? hehehe

Philip Arnold
Technical Director
Certified ColdFusion Developer
ASP Multimedia Limited
Switchboard: +44 (0)20 8680 8099
Fax: +44 (0)20 8686 7911

www.aspmedia.co.uk
www.aspevents.net

An ISO9001 registered company.

**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**


__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.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