diff --git a/Build/Automate/CS1/Build.ps1 b/Build/Automate/CS1/Build.ps1 index 93ff214..29ac73d 100644 --- a/Build/Automate/CS1/Build.ps1 +++ b/Build/Automate/CS1/Build.ps1 @@ -100,7 +100,6 @@ if (([bool]($emailto -as [Net.Mail.MailAddress])) -and ($SmtpServer -ne "none")) $mailmessage.Body = $Summary $attach = new-object Net.Mail.Attachment("C:\buildlog.txt") $mailmessage.Attachments.Add($attach) - $message.Attachments.Add($attach) $SMTPClient.Send($mailmessage) } Read-Host "Rebooting after VMTools Install" diff --git a/Build/Automate/CS2/Build.ps1 b/Build/Automate/CS2/Build.ps1 index 13211f4..77ff9db 100644 --- a/Build/Automate/CS2/Build.ps1 +++ b/Build/Automate/CS2/Build.ps1 @@ -103,8 +103,7 @@ if (([bool]($emailto -as [Net.Mail.MailAddress])) -and ($SmtpServer -ne "none")) $mailmessage.Subject = "$env:computername VM build finished" $mailmessage.Body = $Summary $attach = new-object Net.Mail.Attachment("C:\buildlog.txt") - $mailmessage.Attachments.Add($attach) - $message.Attachments.Add($attach) + $mailmessage.Attachments.Add($attach) $SMTPClient.Send($mailmessage) } Read-Host "Reboot?" diff --git a/Build/Automate/DC/Phase2.ps1 b/Build/Automate/DC/Phase2.ps1 index f5d8e7a..0b6df8e 100644 --- a/Build/Automate/DC/Phase2.ps1 +++ b/Build/Automate/DC/Phase2.ps1 @@ -602,7 +602,6 @@ if (($vmtools) -and (-Not (Test-Path "C:\Program Files\VMware\VMware Tools\VMwar $mailmessage.Body = $Summary $attach = new-object Net.Mail.Attachment("C:\buildlog.txt") $mailmessage.Attachments.Add($attach) - $message.Attachments.Add($attach) $SMTPClient.Send($mailmessage) } Start-Process B:\VMTools\setup64.exe -ArgumentList '/s /v "/qn"' -verb RunAs -Wait diff --git a/Build/Automate/SS/Build.ps1 b/Build/Automate/SS/Build.ps1 index 29373cd..c86f8a1 100644 --- a/Build/Automate/SS/Build.ps1 +++ b/Build/Automate/SS/Build.ps1 @@ -94,7 +94,6 @@ if (([bool]($emailto -as [Net.Mail.MailAddress])) -and ($SmtpServer -ne "none")) $mailmessage.Body = $Summary $attach = new-object Net.Mail.Attachment("C:\buildlog.txt") $mailmessage.Attachments.Add($attach) - $message.Attachments.Add($attach) $SMTPClient.Send($mailmessage) } Read-Host "Rebooting after VMTools Install"