It is also worth noting that most modern email clients do not display 
images from img tags by default when you open an email
(you normally have a load images button)

You can get round this by send the image as an attachment to the email 
and you can then reference the attached image using an img tag in the 
email body.

eg <img src="cid:attachedgraph.gif">


KeithB wrote:
> It looks like there might be an "IsHtmlBody" parameter that you can
> set to True (boolean).
>
> Possibly $SMTPMessage.IsHtmlBody = ____
>
>
> In addition, I forgot to add that you'll want to specify a full page
> of HTML in your body.
>
> $MessageBody = "<html><body><h2>EXCHSVR01 Pie Chart</h2><p><img
> src=......... /></p></body></html>"
>
>
> Hope that helps,
> K
>
> On Jan 27, 11:49 am, superdave <[email protected]> wrote:
>   
>> I'm basically using PowerShell to generate the Exchange Data, and
>> dynamically creating the HTTP Google Chart URL (kind of a daily
>> distro).  This is a snipit of my current code... but it simply places
>> the URL link in the email... or if I use <img src='http://
>> googlechart.com' />... all I get is the text, no image.  Am I doing
>> something wrong so the HTML coding is not working? Do I need to
>> specifiy HTML somewhere?
>>
>> ...
>> $pie_chart = "http://chart.apis.google.com/chart?
>> cht=p3&chs=365x150&chds=0," + $lval + "&chd=t:" + $valueBlock +
>> "&chl=" + "Exchange Data" + "&chco=0000ff,00ff00,ff0000,FFFFFF,000000"
>>
>> $FromAddress = "[email protected]"
>> $ToAddress = "[email protected]"
>> $MessageSubject = "Google Charts - EXCHSVR01"
>> $MessageBody = "
>> EXCHSVR01 Pie Chart
>> $pie_chart
>> <img src=$pie_chart />
>> "
>> $SendingServer = "EXCHSVR01.corp.local"
>> $SMTPMessage = New-Object System.Net.Mail.MailMessage $FromAddress,
>> $ToAddress,
>> $MessageSubject, $MessageBody
>> $SMTPClient = New-Object System.Net.Mail.SMTPClient $SendingServer
>> $SMTPClient.Send($SMTPMessage)
>>
>> THANKS!
>>
>> On Jan 27, 11:30 am, KeithB <[email protected]> wrote:
>>
>>     
>>> To different answers to the same question...
>>>       
>>> James' response refers to you manually sending the image via Microsoft
>>> Outlook or Windows Mail or even Google Mail. Request the chart within
>>> your browser, right click on the image and save it to your computer
>>> and then attach that image within your e-mail.
>>>       
>>> My first response assumed that you wanted to generate a chart an
>>> included it (programmatically) within an e-mail auto-generated by an
>>> application or a form submission, etc.
>>>       
>>> Cheers,
>>> K
>>>       
> >
>   

-- 
MINDsweep
25 albany street
edinburgh - UK - eh1 3qn

m: 07786984428


MINDsweep www.mindsweep.net is a division of c2sky services limited
www.c2sky.net

This e-mail may contain confidential information.  It is intended solely
for the attention of the designated recipient(s).  If you are not the
intended recipient, you must not make any use of the information
contained in the e-mail or cause or allow anyone to do so.  Please
contact the sender immediately and delete the message. 



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Chart API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-chart-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to