Reputation: 557
I am able to send text to the mobile which has Verizon network using simple SMS gateway as follows:
#!/bin/bash
mail [email protected] < sample.txt
Above Code sends the data of sample.text to phone number - 1234567890 But SMS gateway is not working for mobile with AT&T network. For example, following code does not work.
#!/bin/bash
mail [email protected] < sample.txt
I have gone through the following link as well but for AT&T networked phone, its not working. https://unix.stackexchange.com/questions/203751/is-there-any-way-to-send-sms-to-a-mobile-number-using-shell-script
Any help would be highly appreciated.
Update: sample.txt is just a text file with let's say just 1 line Hello World
Also the server is same. From this server, I am able to send text to Verizon networked phone but NOT to the AT&T networked phone.
Upvotes: 2
Views: 1515
Reputation: 1
I solved this issue in a bash script via sendmail. AT&T expects Return-Path to be a valid email address. My script was using an invalid root@autodvr "From:" field.
What worked for me (sanitized):
echo -e "Return-Path: [email protected]\nTo: [email protected]\n\nHello world" | sendmail
Upvotes: 0