You have no idea how much time I spent trying to figure this out.
Why I did this
T-Mobile has a service that lets you send emails to email@example.com and it will arrive on your phone as an SMS. The problem is that their processing causing the messages to arrive from a new shortcode each time, even if the emails are from the same sender. This caused me problems, because I configured my server to text me whenever there is an SSH login, and having a hundred different phone numbers I have to clear every day is too much work. So, I did a bit of experimenting, and I finally managed to create a template that causes T-Mobile to send it as an MMS, which means your phone’s messaging app will see the email address, and group the text messages together.
Now that you’re bored and probably close to closing this post, I’ll give you the bash script I use:
if [ -z $1 ] || [ -z $2 ]
echo "Use: mms.sh subject body"
cat <<EOF |
Content-Type: text/plain; charset="utf-8"
To create a script with this, all you need is to copy and paste it into a file, and change the from and to headers. Then, just run the script with
bash mms.sh "subject goes here" "message goes here"
and within a few seconds, a message should be sent to your phone.
How I found this
T-Mobile support gave me this link, which said that I should just be able to set is as an HTML email. The problem is that then, the message was sent as an attachment, which was really annoying. I eventually figured out that messages sent from rainloop webmail worked just fine, and the script is a slimmed down version of all the headers.
Why not just email?
Because MMS works even without an internet connection, and for some reason, I can’t get LTE in my school, but messages and calling goes through just fine. So, now I get notified even when I’m in my school 🙂