How to send SMS text message from your PC

Sending a text message from a PC to your phone seems like a simple party trick (and it is) but there are many more practical and useful reasons for sending automated text messages.

To list a few:

  • Alert you to motion at your front door (package delivery)
  • Let you know the washer or dryer is finished
  • Inform you the party button was triggered
  • Notify you of suspicious activity on your local network
  • Inform you when your 3D printer has finished
  • And the list goes on...

Today I'm going to focus on the how to send a text message from your PC via email. Note: this method is for a windows operating system if you are using a MAC or Linux operating system the script method will need to be modified.

You need two pieces of information to start:

  1. the SMS gateway of the phone number you are sending the text to. A comprehensive list can be found here but I included the major US carriers below for easy reference
  2. An email address to send the text message from

The major US Carrier gateways are:

  • AT&T:
  • Sprint:
  • Tmobile:
  • Verizon:

Now that you have the gateway and an email address paste the following code into a new text file and substitute the "fromEmail", "password", and "emailObj.To" fields with your information. You also want to change "emailObj.Subject" and "emailObj.TextBody" to your own tailored message. Note: you can send to multiple phone numbers by including multiple numbers in the "emailObj.To" field separated by semicolons.


Const fromEmail = ""
Const password = "password"


Dim emailObj, emailConfig
Set emailObj = CreateObject("CDO.Message")
emailObj.From = fromEmail
emailObj.To = ""
emailObj.Subject = "Party"
emailObj.TextBody = "Party Button has been activated"

Set emailConfig = emailObj.Configuration
emailConfig.Fields("") = ""
emailConfig.Fields("") = 465
emailConfig.Fields("") = 2
emailConfig.Fields("") = 1
emailConfig.Fields("") = true
emailConfig.Fields("") = fromEmail
emailConfig.Fields("") = password


Set emailobj = nothing
Set emailConfig = nothing

Once you finish making edits save the file as a .vbs file type. If you are not familiar with how to change file extensions, you can see an example here.


Now you have an operational text message script! All you have to do now is set it to be executed by whatever event you want. You can look here for an example of how to execute a .vbs script.