*I am trying to take server side acquired data, wrapped in HTML, PHP code, 
Javascript or whatever, to build code then sent via mail so the the 
recipient's browser shows him a graphic, *

I've tried to use Google Charts Quickstart code 
(https://developers.google.com/chart/interactive/docs/quick_start) 

I've tried for three days to get it to work in a PHP email executed from 
the BASH shell, e.g. *php t5.php* 
I am able to successfully send basic HML in the mail php template code 
below. 
 
I took the quick-start code (above) and put it in the PHP email template 
(below) , being careful to change the proper double quotes (") to single 
quotes ('). See attached code (t5.php).

*<?php*

* $to .= '[email protected]';*


* $subject = 'Google Chart';*

*$message = "*
*<html>*
*.*
*.see attached file with Google quick-start source*
*.*
*</html>*
*";*


*$headers = 'MIME-Version: 1.0' . "\r\n";*
*$headers .= 'Content-type:text/html;charset=UTF-8' . "\r\n";*

*mail($to,$subject,$message,$headers);*
*?>*
 
So, I'm wondering if I have an improper Header or if Javascript is an issue 
or if I've done something stupid with quotes. 

I've searched Google, several forums, Github, etc. for to find a simple 
working example of a Google Chart embedded in an email using a process that 
can be automated. No joy. 
Perhaps this cannot be done via mail and can only be done from a website? 

It has been suggested that I take screenshots and send the .png or .jpg to 
my target recipient - not a process that can be automated. 


   1. *If for some reason this can't be done, I'd like to know.*
   2. *If it can be done, I'd love to see an example. *
   3. *If there is a better way to send data, wrapped in HTML, PHP code, 
   Javascript or whatever, to build code then sent via mail so the the 
   recipient's browser shows him a graphic, I would love to know what it is. *
   
Thank you. 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/4512d9e6-f730-4122-9a5c-b0dbffe4a780%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

<<attachment: t5.php>>

Reply via email to