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
--~--~---------~--~----~------------~-------~--~----~
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