0
Explorer
,
/t5/coldfusion-discussions/cfmail-and-html-content/td-p/993902
Feb 15, 2008
Feb 15, 2008
Copy link to clipboard
Copied
I have created a newsletter page for a client and I would
like to give him the option of sending it via cfmail but I cant
seem to send the dynamic content as I get errors with nesting.
The page is pretty complicated but comes in fine until it is in the cfmail tags.
Is there any way to copy the html of a page and send it to another page to be sent by cmmail?
Any suggestions would help.
The page is pretty complicated but comes in fine until it is in the cfmail tags.
Is there any way to copy the html of a page and send it to another page to be sent by cmmail?
Any suggestions would help.
TOPICS
Advanced techniques
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
1 Correct answer
Explorer
,
Feb 18, 2008
Feb 18, 2008
I have found a great solution in CFINCLUDE. I was able to
include the page withing the CFMAIL tags

/t5/coldfusion-discussions/cfmail-and-html-content/m-p/993903#M90505
Feb 15, 2008
Feb 15, 2008
Copy link to clipboard
Copied
> ...I get errors with nesting.
Please post the exact error message.
Please post the exact error message.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
iambennuris
AUTHOR
Explorer
,
/t5/coldfusion-discussions/cfmail-and-html-content/m-p/993904#M90506
Feb 15, 2008
Feb 15, 2008
Copy link to clipboard
Copied
Thank for the reply. The code is attached
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

/t5/coldfusion-discussions/cfmail-and-html-content/m-p/993905#M90507
Feb 16, 2008
Feb 16, 2008
Copy link to clipboard
Copied
This error message explains your problem.
Error Occurred While Processing Request
Invalid tag nesting configuration.
A query driven cfoutput tag is nested inside a cfoutput tag that also has a query attribute. This is not allowed. Nesting these tags implies that you want to use grouped processing. However, only the top-level tag can specify the query that drives the processing.
The error occurred in C:\ColdFusion8\wwwroot\IAEsandbox\Indie\NewsLetterTemp.cfm: line 602
Called from C:\ColdFusion8\wwwroot\IAEsandbox\Indie\NewsLetterTemp.cfm: line 51
Called from C:\ColdFusion8\wwwroot\IAEsandbox\Indie\NewsLetterTemp.cfm: line 49
Called from C:\ColdFusion8\wwwroot\IAEsandbox\Indie\NewsLetterTemp.cfm: line 1
600 : </div>
601 : <div id="FeaturedCDAnnc"> CDs:Editor's Choice</div>
602 : <cfoutput query="getCDs" >
603 : <cfif getCDs.cdID eq getNewsletter.nlCD2 AND getCDs.cdID neq #getSites.cdID#>
604 : <div class="FeaturedCD">
Error Occurred While Processing Request
Invalid tag nesting configuration.
A query driven cfoutput tag is nested inside a cfoutput tag that also has a query attribute. This is not allowed. Nesting these tags implies that you want to use grouped processing. However, only the top-level tag can specify the query that drives the processing.
The error occurred in C:\ColdFusion8\wwwroot\IAEsandbox\Indie\NewsLetterTemp.cfm: line 602
Called from C:\ColdFusion8\wwwroot\IAEsandbox\Indie\NewsLetterTemp.cfm: line 51
Called from C:\ColdFusion8\wwwroot\IAEsandbox\Indie\NewsLetterTemp.cfm: line 49
Called from C:\ColdFusion8\wwwroot\IAEsandbox\Indie\NewsLetterTemp.cfm: line 1
600 : </div>
601 : <div id="FeaturedCDAnnc"> CDs:Editor's Choice</div>
602 : <cfoutput query="getCDs" >
603 : <cfif getCDs.cdID eq getNewsletter.nlCD2 AND getCDs.cdID neq #getSites.cdID#>
604 : <div class="FeaturedCD">
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
iambennuris
AUTHOR
Explorer
,
/t5/coldfusion-discussions/cfmail-and-html-content/m-p/993906#M90508
Feb 17, 2008
Feb 17, 2008
Copy link to clipboard
Copied
Jdeline,
Thank you for your response. I use the same code without the CFMail tag and do not get and error. I have removed the information but left all the tags so you could see that nothing is nested Query in Query. Unless the CFMAIL tag is itself a type of query.
Thanks for your time and knowledge,
iam
Thank you for your response. I use the same code without the CFMail tag and do not get and error. I have removed the information but left all the tags so you could see that nothing is nested Query in Query. Unless the CFMAIL tag is itself a type of query.
Thanks for your time and knowledge,
iam
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

/t5/coldfusion-discussions/cfmail-and-html-content/m-p/993907#M90509
Feb 18, 2008
Feb 18, 2008
Copy link to clipboard
Copied
What if you created the email text in a varaible, then drop
it into the CFMAIL tag at the end. That would remove the nesting.
So, you would start a variable at the top and the variable would contain all the HTML you want in the email. You then do all you looping, conditionally adding info to the variable as you loop. Then, at the end just drop the variable into the CFMAIL tag?
So, you would start a variable at the top and the variable would contain all the HTML you want in the email. You then do all you looping, conditionally adding info to the variable as you loop. Then, at the end just drop the variable into the CFMAIL tag?
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Explorer
,
LATEST
/t5/coldfusion-discussions/cfmail-and-html-content/m-p/993908#M90510
Feb 18, 2008
Feb 18, 2008
Copy link to clipboard
Copied
I have found a great solution in CFINCLUDE. I was able to
include the page withing the CFMAIL tags
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

