You have a function mailer
in the emailer.ps1
file.
But, you are not calling the function mailer
anywhere inside the script. That could be the reason why you are not receiving the email.
So, you would need to change the script emailer.ps1
:
For example:
param(
[Parameter(Position=0, Mandatory=$true)]
[string] $Repos,
[Parameter(Position=1, Mandatory=$true)]
[string]$Rev,
[Parameter(Position=2, Mandatory=$true)]
[string]$TXN_NAME
)
$smtp = new-object Net.Mail.SmtpClient("webmail.factset.com")
$objMailMessage = New-Object System.Net.Mail.MailMessage
$objMailMessage.From = "FFTO-Automation@factset.com"
$i = 0
Get-Content "H:\Department\Content\Hyderabad\FF_Technical\TestPool\recepients.txt" | foreach {
$emailid = $_.split(";")
$emailid | foreach{
$objMailMessage.To.Add($emailid[$i])
$i++
}
}
$objMailMessage.Subject = "A commit operation has been performed! "
$objMailMessage.Body = "A commit operation has been performed at repository "+$Repos+" and the latest revision is "+$Rev
$smtp.send($objMailMessage)
I am not very familiar with tortoise svn; so do not know much about getting the author's name.