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 = "
Mailbo...@company.com"
$ToAddress = "
ExchangeRepo...@company.com"
$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!