Topics

User alerts sms trouble

Terry N8JX
 

Hi all need help trying to setup text alert to my cell phone and cant get it to work any body have a fix
here are my files and batch file
$EmailFrom = “xxxxxx@...”
$EmailTo = “123456789@...”
$Subject =””
$Body = $Env:JTAlert_AlertType+” “+ $Env:JTAlert_State+” “+ $Env:JTAlert_Country+” “+ $Env:JTAlert_Call+” “+ $Env:JTAlert_Band
$SMTPServer = “smtp.mail.yahoo.com”
$SMTPClient = New-Object Net.Mail.SmtpClient($SMTPServer, 587)
$SMTPClient.EnableSsl = $true
$SMTPClient.Credentials = New-Object System.Net.NetworkCredential(“xxxxx@...”,”xxxxxxxxxxxxl”)
$SMTPClient.send($EmailFrom,$EmailTo,$Subject,$Body)

My Batch file 
powershell -executionpolicy bypass -InputFormat Text -File “C:\Users\n8jx1\jtalertps1\jtalert.ps1”

Anybody know what I am doing wrong
Thanks for the ideas

 

Michael Black
 

I've got a script on my QRZ page for doing this with powershell....


Mike W9MDB





On Thursday, May 21, 2020, 11:06:36 AM CDT, Terry N8JX <n8jx100@...> wrote:


Hi all need help trying to setup text alert to my cell phone and cant get it to work any body have a fix
here are my files and batch file
$EmailFrom = “xxxxxx@...”
$EmailTo = “123456789@...”
$Subject =””
$Body = $Env:JTAlert_AlertType+” “+ $Env:JTAlert_State+” “+ $Env:JTAlert_Country+” “+ $Env:JTAlert_Call+” “+ $Env:JTAlert_Band
$SMTPServer = “smtp.mail.yahoo.com”
$SMTPClient = New-Object Net.Mail.SmtpClient($SMTPServer, 587)
$SMTPClient.EnableSsl = $true
$SMTPClient.Credentials = New-Object System.Net.NetworkCredential(“xxxxx@...”,”xxxxxxxxxxxxl”)
$SMTPClient.send($EmailFrom,$EmailTo,$Subject,$Body)

My Batch file 
powershell -executionpolicy bypass -InputFormat Text -File “C:\Users\n8jx1\jtalertps1\jtalert.ps1”

Anybody know what I am doing wrong
Thanks for the ideas