Quick script for sending an SMS to any US number from a computer terminal, via a Gmail account.
-
Download script and install gems
$ git clone https://github.com/reedspool/ruby_email_txt.git; $ bundle install;
-
Fill in your e-mail credentials in
config.yml
-
If you use 2-Factor Auth (You should!), you will need to generate an App Password, and use it in
config.yml
$ ruby send_txt_to.rb 8085553033 "I lost my phone :(";
-
Make a bash alias for easy texting
$ alias sms_to="ruby send_txt_to.rb "; $ sms_to 8085553033 "I lost my phone :(";
-
Check your e-mail inbox for replies!
-
If you use this often, you will want to make a Gmail filter for all the delivery failures. These are normal. See Notes.
This script is not fit for production use. It is a toy.
It works by spamming each US SMS gateway for each method without knowledge of which will work. Many "failed delivery" messages will be sent to your inbox with each use because of the naive method.
Requires gmail
gem. See Gemfile and gmailgem on Github.