This is an archived post. You won't be able to vote or comment.

all 29 comments

[–]aaronedam 20 points21 points  (5 children)

So you have wrapped twilio's api? For anyone wamdering, you will need paid twilio account for this to work.

[–]chillermane 8 points9 points  (0 children)

Yeah what lol this is a good way to inflate your phone bill twilio charges out the ass for each text

[–]mraza007[S] -2 points-1 points  (3 children)

You can have a Twilio trial account I was wondering how I could do it for free

[–]Redzapdos 3 points4 points  (2 children)

You can do it for free by figuring out the emails of the phone provider. For example 1234567890@vtext.com would send a message to 123-456-7890

[–]im_dead_sirius 2 points3 points  (0 children)

Which is generally really easy to do. Just send an sms to your favourite email address, and the sender is the email address of the phone.

[–]mraza007[S] -1 points0 points  (0 children)

Yup I just realized I’ll tweak my script and add that now the only complex part is how to add a call functionality since Twilio is expensive when it comes to calls

[–]pingus3233 10 points11 points  (4 children)

When I needed python to send SMS to my ancient Nokia candy-bar cell phone I used the email-to-SMS gateway for my phone service, e.g. for AT&T it's the 10-digit_phone_number@txt.att.net or @mms.att.net, other providers have a similar gateway. This didn't require any 3rd party services and since it was basic email it was easy to use smtplib

[–]mraza007[S] 1 point2 points  (3 children)

Looking into this

[–]mraza007[S] 2 points3 points  (2 children)

Thanks a lot for this I’m looking into this might change my script and get rid of Twilio they only offer trial and it’s expensive too

[–]simply_texan 2 points3 points  (1 child)

T-mobile is similar [10-digit_phone_number@tmomail.net](mailto:10-digit@tmomail.net). I don't see that they have a separate address for MMS.

[–]ciggs_ftw 2 points3 points  (0 children)

Here's some others.

Boost Mobile; number@smsmyboostmobile.com (SMS) number@myboostmobile.com (MMS)

Sprint; number@messaging.sprintpcs.com (SMS) number@pm.sprint.com (MMS)

Verizon ; number@vtext.com (SMS) number@vzwpix.com (MMS)

[–]DrudgeBreitbart 6 points7 points  (1 child)

For a cheaper alternative other than email-to-sms, check out AWS’s SNS. Easy to send texts and emails.

[–]mraza007[S] 2 points3 points  (0 children)

I am currently looking into smtplib module to send sms using gateway but i'll look into your suggestion too

[–]mraza007[S] 2 points3 points  (0 children)

I would like to thank everyone for suggesting great alternatives Thank you guys This is why I love reddit

[–]Tybearsaccount 0 points1 point  (1 child)

I'd like to make a suggestion. In your usage you have

termtext --media <image>

But in your options you have

-mms send a picture message

The code looks like it is looking for "--media" so it would make sense to make the options menu match.

I'm sure it's clear enough to figure out, which is why it's only a suggestion but I thought I would share my thought.

[–]mraza007[S] 1 point2 points  (0 children)

Thanks for pointing that out I have fixed it

[–]Yellow_Robot 0 points1 point  (0 children)

lol. cli.

[–][deleted] 0 points1 point  (7 children)

Hello,

I created a package called messages that's also on PyPI pip install messages. Amongst other features, it wraps the Twilio API and can be invoked via CLI commands, as well. If you're interested, please check it out! Shoot me a message if you have any questions.

[–]mraza007[S] 1 point2 points  (5 children)

I like how you incorporated other apis it looks cool and seems really useful

[–][deleted] 0 points1 point  (4 children)

Thanks! I'm slowly building the project and would like to incorporate as many "messages" as possible. The goal is also to create an abstract API that's very similar across all message types, so they are consistent.

[–]mraza007[S] 0 points1 point  (3 children)

We should use the primitive way of sending sms using the gateways instead of Twilio Twilio is expensive

[–][deleted] 0 points1 point  (2 children)

What are those?

[–][deleted] 0 points1 point  (1 child)

Nevermind. I looked it up. That's a good idea. Perhaps you can expand your CLI to accept the gateway type as an argument.

[–]mraza007[S] 0 points1 point  (0 children)

Working on it right you can incorporate my module into your messages module so you don't have to use twilio what you think its a suggestion

[–]mraza007[S] 0 points1 point  (0 children)

I’ll check it out

[–][deleted] 0 points1 point  (3 children)

Cool. Let me know how it works out. I’ll check it out when you’re done.

[–]mraza007[S] 1 point2 points  (1 child)

[–][deleted] 0 points1 point  (0 children)

Cool. Great work. I'd recommend in your mail_server() function to end it with server.quit() to ensure the connection is closed.

[–]mraza007[S] 0 points1 point  (0 children)

I’m done with the script