> Would anyone know if it is possible to generate a
cfchart in an email?
no, not possible.
but you could:
- first generate a jpeg-format chart and, using the NAME
<cfchart> tag assign it to a variable instead of
displaying the chart
- use <cffile action="write"
file="fullpathtoyourfilehere" addnewline="no"> to save it
as a jpeg image,
- and then attach that file to the email.
You can also embed it in the email using a bit of MIME
trickery, although this is far more complicated, using the
1. Generate the chart and give it a name so it is stored in a
2. Generate a UUID that you will use as a CID for the image
in the email.
3. Save the image to a temporary directory using the UUID as
4. Write the HTML contents of the email and place an <img
the UUID"> where you want the chart to appear.
5. Attach the file to the email
6. Delete the temp file