File Exchange

image thumbnail

TxtMsg Create

version (19.3 KB) by Robert M. Flight
GUI generates a function useful for sending text messages from Matlab


Updated 17 Dec 2007

View License

This GUI takes user information and creates a function that is capable of sending text messages to the provided phone number using the sendmail function in Matlab and a GMail email account. All major North American carriers are included (including Aliant, Telus & Rogers in Canada), however if you can find the texting address for your carrier you may include it directly in the phone number field.

The generated function is able to take a subject and message argument, allowing customization of sent messages.

The function, with GMail account information, password, and phone number is a binary p-file to keep the information hidden. The entered password is also kept hidden while using the GUI.

Each P file function generated is unique according to username, allowing for multiple phone numbers, as well as multiple users on the same machine, although this is not recommended.

Included files are the GUI itself, the mat file containing the text to be used for actually generating the M function, and an example M file that shows the text used to create the P-file function.

Tested using R2007a, Windows XP

Cite As

Robert M. Flight (2021). TxtMsg Create (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (3)

Robert M. Flight

Instructions for using the file output by txtmsg_create.

Once the file is created, to send a text message you would do:

function_txtmsg('Subject Text','message text')

If only one text string is supplied, the text is assumed to be the subject of the text message and it will be sent with an empty body.

Robert Flight

I would recommend to all users to download this version as the required information is now stored in the function itself as a binary P-file instead of the mat files. The P file can then be put wherever you need to be on the Matlab path.

Robert Flight

If anyone can actually find a way to encrypt the password somehow (I couldnt figure out how to do this yet) so that it is not stored in plaintext in the Mat file, that would be really useful.


MATLAB Release Compatibility
Created with R2007a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired by: login, Send Text Message to Cell Phone

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!