r/LearnPowerShell • • Feb 03 '21

Sending text with SMS gateways

Hi all,

I have written a script to send emails that works fine for emailing actual email addresses. But the moment I enter in a *10DigitPhonNumber*@vtext.com (spectrum/verizon number), the script runs, but no text is received. I tested with 11 digit numbers as well (US code 1) and it does the same thing. I have also tried it for tmobile numbers, and the same issue occurs.

Am I missing something? Any help would be appreciated.

my actual script is VERY barebones at this time. I declare my variables, and input my smpt server info when I am prompted. You will notice in the snipet below, I do not have -usessl, as this server does not use ssl.

Send-MailMessage -From $From -to $To -Subject $Subject -Body $Body -SmtpServer $SMTPServer -port $SMTPPort -Credential (get-credential)

1 Upvotes

1 comment sorted by