File Exchange Pick of the Week

Our best user submissions

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

MATLAB can “txt msg u :)” 3

Posted by Doug Hull,

People have used different methods over the years to have MATLAB alert them when MATLAB is done with a long set of calculations from playing a sound file, to sending an e-mail, or now sending a text to your cell phone.

This is a nice little mash-up that uses SENDMAIL to send mail to your Google Gmail account with the right formatting that tells Google to send the text for you.

This is a well written piece of code with nice help and good examples. How will you use this, I would love to hear the story. Click here to download it.


Comments are closed.

3 CommentsOldest to Newest

Tim Davis replied on : 1 of 3
This is really cool, but entering a password in plain text into a file is a really bad security risk; particularly if that file has the word "password" on the same line. Yikes! Makes for a good target via an automatic file search. It would be better if the password was encrypted somehow. For example, a MATLAB GUI could prompt you for your email and password. Then that GUI could twiddle the password with some a reversible operation and then that password could be saved in a MATLAB *.mat file. At least that would make it hard for a non-MATLAB savvy hacker, or virus, to sniff out the password. Then, in addition, the m-file here should not use the variable name "password" or use the word "password" in any comments. I'm sure there are better techniques - Java, via MATLAB, can do encryption and decryption, for example.
Doug replied on : 2 of 3
Tim, An excellent thought. Anyone made a little encryption routine for MATLAB? If not, this GUI that I promoted earlier: might be helpful! Thanks, Doug
Ke Feng replied on : 3 of 3
If you know an SMTP server which doesn't require login (you company may provide you one), you can use that to avoid the password line. If you don't know any SMTP server, you can install one free on your own computer: To use your own (or your company's) SMTP server, delete the following lines: password = 'xxxxxxxxx'; setpref('Internet','SMTP_Username',mail); setpref('Internet','SMTP_Password',password); props = java.lang.System.getProperties; props.setProperty('mail.smtp.auth','true'); props.setProperty('mail.smtp.socketFactory.class', ''); props.setProperty('mail.smtp.socketFactory.port','465'); and change the following line: setpref('Internet','SMTP_Server',''); to your own server. If you use that program I mentioned above, use '' instead of ''. Then you won't need any password.