Closed santoshchowdary07 closed 8 years ago
Can you post your config file? It looks like it's not even trying to send the email, either because the report is empty and $EmailReportEvenIfEmpty is $false, or because $SendEmail is set to $false
Below is the configuration for my vcheck. I have deleted email addresses and smtp server from below report for security reasons.
# You can change the following defaults by altering the below settings:
#
# Set the following to true to enable the setup wizard for first time run
$SetupWizard = $False
# Start of Settings
# Report header
$reportHeader = KWPVVC002 vCheck Report"
# Would you like the report displayed in the local browser once completed ?
$DisplaytoScreen = false
# Display the report even if it is empty?
$DisplayReportEvenIfEmpty = true
# Use the following item to define if an email report should be sent once completed
$SendEmail = true
# Please Specify the SMTP server address (and optional port) [servername(:port)]
$SMTPSRV = "xyz"
# Would you like to use SSL to send email?
$EmailSSL = $false
# Please specify the email address who will send the vCheck report
$EmailFrom = "xyz"
# Please specify the email address(es) who will receive the vCheck report (separate multiple addresses with comma)
$EmailTo = "xyz"
# Please specify the email address(es) who will be CCd to receive the vCheck report (separate multiple addresses with comma)
$EmailCc = ""
# Please specify an email subject
$EmailSubject = "ETCKWPVVC002 vCheck Report"
# Send the report by e-mail even if it is empty?
$EmailReportEvenIfEmpty = $true
# If you would prefer the HTML file as an attachment then enable the following:
$SendAttachment = $false
# Set the style template to use.
$Style = "VMware"
# Do you want to include plugin details in the report?
$reportOnPlugins = $true
# List Enabled plugins first in Plugin Report?
$ListEnabledPluginsFirst = $true
# Set the following setting to $true to see how long each Plugin takes to run as part of the report
$TimeToRun = $true
# Report on plugins that take longer than the following amount of seconds
$PluginSeconds = 30
# End of Settings
# End of Global Variables
From looking at the screenshot, this must be evaluating to false if ($SendEmail -and (!($emptyReport -and !$EmailReportEvenIfEmpty))) {
Is the report generated in your temp directory? And what version of vCheck are you running?
I don't see the report generated in my temp directory. I am using the latest version downloaded from below URL.
Hi Sneddo,
Is there any solution for my issue?
I assume you mean the latest from the master branch? https://github.com/alanrenouf/vCheck-vSphere/archive/master.zip
I just noticed you seem to be hitting issue #217 as well, which may explain it...
There is a wrong parameter in the vCheck.ps1 file.
Beginning on line 809 (I'm using Notepad++ to edit) change the variable $server to $smtpsrv
$smtpClient.Host = ($SMTPSRV -Split ":")[0] if (($server -split ":")[1]) { $smtpClient.Port = (_$server _-split ":")[1] }
TO
$smtpClient.Host = ($SMTPSRV -Split ":")[0] if (($SMTPSRV -split ":")[1]) { $smtpClient.Port = ($SMTPSRV -split ":")[1] }
Good catch, fixed in the dev branch
I hit this problem today as well, hopefully it will be fixed soon.
Michael
What is the format when your email server requires a password? I saw in a post username/password but I'm not receiving emails and I applied the change above. $smtpClient.Host = ($SMTPSRV -Split ":")[0] if (($SMTPSRV -split ":")[1]) { $smtpClient.Port = ($SMTPSRV -split ":")[1] } Tom
email working. username@domain.com
is the change above updated as I just downloaded the zip and i had to make the smtpsrv change? t
$SMTPSRV did the trick for me, Thanks a ton ..!!
AB
Hi,
I ran the vCheck.ps1 and it did not send me any email with the report. Below is the output screenshot.