VMware Cloud Community
samcom
Contributor
Contributor

VM Report Script that needs to email me using html format

I could use some help figuring out why this won't email me the report.  Could someone please be kind enough to take a look at this script and offer some suggestions.

0 Kudos
6 Replies
LucD
Leadership
Leadership

Is the $SMTPSRV variable pointing to a working SMTP server in your environment ?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
samcom
Contributor
Contributor

If you mean does it point to "smtpserver.mydomain" then no that is something made up for the sake of keeping things private.  But in the real script it does point to a smtp server that is in the live environment.  Thanks.

0 Kudos
LucD
Leadership
Leadership

Any error messages during the run of the script ?

From where do you run the script ? The PowerCLI prompt, PowerGui... ?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
samcom
Contributor
Contributor

No errors.  I am running it from the PowerCLI prompt.

0 Kudos
LucD
Leadership
Leadership

Just ran the attached script in my test environment (after changing the SMTP server).

I had no errors and I got an email with the report in there.

Do you see the "..Sending Email" line appearing on screen ?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
samcom
Contributor
Contributor

Actually it did say sending email.  And it did receive the email.  Not sure what happened the first time I ran it.  Thanks for replying back.

0 Kudos