Episode: 2379
Title: HPR2379: sending a text message from the command line
Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr2379/hpr2379.mp3
Transcribed: 2025-10-19 02:00:07

---

This is HPR episode 2,379 entitled, sending a text message from the command line.
It is hosted by Genre and is about 5 minutes long, and carries an explicit flag.
The summary is a bunch of waffling on about email and text message sending from the command line.
This episode of HPR is brought to you by an honesthost.com.
Get 15% discount on all shared hosting with the offer code HPR15.
That's HPR15.
Better web hosting that's honest and fair at an honesthost.com.
Hello HPR listeners, my name is Jezra, and I'm going to talk about sending a text message
from the command line on a GNU Linux computer.
This episode is being recorded on a GNU Linux laptop with a Logitech USB headset and audacity
as the recording and editing software.
The need to be able to send myself a text message came about when I was building my GNU Linux
powered chicken coop door.
If there was a problem opening or closing the door, I wanted the controlling computer to
be able to send me both an email and a text message.
The computer controlling the chicken coop door is a beagle bone black running devian.
In order to send an email from the command line, I first needed to install the mail ex command
line email client.
In order to accomplish this, I installed the heirloom mail ex package from the devian repositories.
Once the necessary software was installed, I signed into my domain registrar and created
a new email account specifically for my shed.
The computer that controls the chicken coop door is in my shed, and I wanted all emails
coming from the shed to be sent from shed at Jezra.net.
So a new email account with name and password was created.
The next step in the process involved reading the mail ex documentation and crafting a command
line script to allow mail ex to connect to SMTP at my email host and send an email from
shed at Jezra.net to Jezra at Jezra.net.
The script was later modified to allow for a sentence to be sent as a command line argument
and that sentence will then be the body of the email that gets sent to me.
The script was given the descriptive but very boring name of email Jezra.
From the command line, I would type email Jezra problem closing the door or email Jezra
problem opening the door and then I would get sent an email with the body that says problem
opening the door or problem closing the door, you get the idea.
Sending a text message instead of an email is an extremely similar process.
The email Jezra script was copied and renamed as text Jezra.
Most mobile phone service providers offer an email address that is based on one's telephone
number and when an email is sent to that email address it will result in a text message
being sent to that phone number.
Basically the address is phone number at some special domain based on the provider.com.
In my case, I use an MVNO that piggybacks on the Verizon network.
So I modified the text Jezra script to not send the email to Jezra at Jezra.net but
to send the email to my phone number at the special domain.
Thus, when I type in text Jezra, hello, how are you doing?
The end result will be a text message coming to my phone from Shed at Jezra.net saying
hello, how's it going?
And that my friends is a fairly easy way to send a text message from the command line on
a GNU Linux computer.
Aside from notifying myself when the chicken coop door has problems opening and closing,
every day at 8 a.m., I run a crontask that scrapes the website of the local air quality
board and sends me a text message letting me know what the air quality is going to be
like that day.
And I would like to know what you, the HPR listener, would send to themselves as a notification
and how it would be done.
So fire up your mic, record an episode, and let me know.
Thank you and have a wonderful day.
Duh-duh-duh-duh-duh-duh-duh-duh-duh-duh-duh-duh-duh-duh-duh-duh-duh-duh-duh-duh-duh-duh-duh-duh-duh-duh-duh-duh-duh-duh,
We are a community podcast network that releases shows every weekday, Monday through Friday.
Today's show, like all our shows, was contributed by an HBR listener like yourself.
If you ever thought of recording a podcast, then click on our contributing to find out how easy it really is.
HECA Public Radio was founded by the Digital Dog Pound and the Infonomicom Computer Club,
and is part of the binary revolution at binwreff.com.
If you have comments on today's show, please email the host directly, leave a comment on the website or record a follow-up episode yourself.
Unless otherwise stated, today's show is released on the creative commons, attribution, share a light, 3.0 license.
