crystal-sms-example
Sending SMS with Crystal
- You will need to have an account at Twilio. Sign up for a free account at https://www.twilio.com/try-twilio
- For convenience, I am using RVM (Ruby Version Manager) to easily load environment variables when I enter the project directory. Feel free to load the environment variables by other means though. If using the RVM approach, copy
.ruby-env.sampleto.ruby-envand put in your Twilio creds and phone number. - Run with
crystal sms.cror build the executable withcrystal build --release sms.crand run with./sms - If run without arguments TO_PHONE is set to the environment variable TO_PHONE, and message is set to an internal default.
- To quickly send a message to a phone number (this requires
crystal buildfrom above) run for example:
./sms 8171234567 "Waas Up?"
Repository
crystal-sms-example
Owner
Statistic
- 0
- 0
- 0
- 0
- 0
- almost 9 years ago
- November 18, 2016
License
Links
Synced at
Mon, 27 Oct 2025 06:33:01 GMT
Languages