Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vCheck is not sending email #436

Closed
santoshchowdary07 opened this issue Jan 23, 2016 · 12 comments

Comments

Projects
None yet
6 participants
@santoshchowdary07
Copy link

commented Jan 23, 2016

Hi,

I ran the vCheck.ps1 and it did not send me any email with the report. Below is the output screenshot.

screen shot 2016-01-23 at 3 49 45 pm

@Sneddo

This comment has been minimized.

Copy link
Collaborator

commented Jan 25, 2016

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

@santoshchowdary07

This comment has been minimized.

Copy link
Author

commented Jan 25, 2016

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
@Sneddo

This comment has been minimized.

Copy link
Collaborator

commented Jan 26, 2016

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?

@santoshchowdary07

This comment has been minimized.

Copy link
Author

commented Jan 26, 2016

I don't see the report generated in my temp directory. I am using the latest version downloaded from below URL.

http://www.virtu-al.net/vcheck-pluginsheaders/vcheck/

@santoshchowdary07

This comment has been minimized.

Copy link
Author

commented Jan 29, 2016

Hi Sneddo,

Is there any solution for my issue?

@Sneddo

This comment has been minimized.

Copy link
Collaborator

commented Jan 29, 2016

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

@AlphaCasper2001

This comment has been minimized.

Copy link

commented Mar 3, 2016

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]
}

Sneddo added a commit that referenced this issue Mar 3, 2016

@Sneddo

This comment has been minimized.

Copy link
Collaborator

commented Mar 3, 2016

Good catch, fixed in the dev branch

@mw403git

This comment has been minimized.

Copy link

commented Apr 10, 2016

I hit this problem today as well, hopefully it will be fixed soon.

Michael

@buckmaster60

This comment has been minimized.

Copy link

commented May 3, 2016

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

@buckmaster60

This comment has been minimized.

Copy link

commented May 3, 2016

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

@bareddy8

This comment has been minimized.

Copy link

commented May 23, 2016

$SMTPSRV did the trick for me, Thanks a ton ..!!

AB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.