Script:Deployment success email

$var1 = $args[0]
#$var1 = “TEST_Log”

if ($? -ne “True”)
{
Write-Host “arguments passed are invalid”
exit -3
}

$From = “INFA961_DEV_no_reply@XXXX.com”
$To = “user.name@XXXX.com”
$Cc = “user.name@XXX.com”
$Attachment = “D:\Informatica\9.6.1\server\infa_shared\log\DEPLOYMENT\Input.txt”
$Subject = “The automated ETL code deployment script successful..”
$Log_Home=”D:\Informatica\9.6.1\server\infa_shared\log\DEPLOYMENT”
#$Body = “Insert body text here”
$Body = “Hi Team,

$Body += “The Automated ETL code deployment script executed successfully for the deployment group $var1 ..

$Body += “All the logfiles for this migration are available at this path ‘D:\Informatica\9.6.1\server\infa_shared\log\AUTOMATED_DEPLOY_LOGS’

$Body += ” ”
$Body += “Regards,

$Body += “Informatica Admin


$Body += “ ********* Don’t Replay to this email ***********

#$SMTPServer = “ServerIPaddress”  #server ipaddress
$SMTPServer = “mail.int.XXX.com”
$SMTPPort = “251”

Send-MailMessage -From $From -to $To -Subject $Subject -Body $Body -BodyAsHtml -SmtpServer $SMTPServer -port $SMTPPort

Advertisements