4.44444

4.4 | 9 ratings Rate this file 132 downloads (last 30 days) File Size: 3.55 KB File ID: #16649

Send Text Message to Cell Phone

by Ke Feng

 

29 Sep 2007 (Updated 01 Oct 2007)

No BSD License  

Send text message to cell phone or other mobile devices

Download Now | Watch this File

File Information
Description

Use this function to send text message to cell phone or other mobile devices. Currently, it works for US based cell phones only.

I found it useful for people who does time-consuming computations constantly. My lab mate often called me in and asked me to check his computer to see if his computations are over. I made this small function for him so he get notified on his cell phone when the computation is done, and he loves it. I think others might like it as well.

Acknowledgements
This submission has inspired the following:
TxtMsg Create
MATLAB release MATLAB 7.4 (R2007a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (19)
01 Oct 2007 Kelly Kearney

This is an excellent solution to the frustrations associated with running models overnight, only to discover the next morning that something crashed an hour after it started. Very well-documented and easy to use.

01 Oct 2007 Nick C

This would be awsome if I were in the US :(

29 Oct 2007 Robert Flight

Looks pretty good, but a couple of comments. This should work for anyone who has a gmail account, and knows the email address that their cell carrier uses for text messaging. For example, I am in Canada, and my cell company is Aliant, and the email address they use is '@txt.aliant.net'. Therefore I can easily add a case 'aliant', with the address '@txt.aliant.net', and it will work fine for me.

I would also recommend creating two matlab *.mat files, one containing the password (named something cryptic) and the email address to send to, thereby making it a little bit harder for someone to get your password.

05 Dec 2007 janet looloo

good

06 Dec 2007 tariq tam

thank you

06 Dec 2007 tariq-tam TAM  
17 Dec 2007 Bassam Abdelnabi  
09 Jan 2008 Santiago Balestrini

This is a great script! Well documented too!

I would like to see something done about the password too, my solution was to create an account in Gmail for our entire lab. If anybody messes with it, I can just create a new account.

15 Jan 2008 Steve Harston

When I try this code I get the following error:

??? Java exception occurred:
java.net.SocketException: Connection reset

at java.net.SocketInputStream.read(Unknown Source)

at java.net.SocketInputStream.read(Unknown Source)

at java.io.DataInputStream.readLine(Unknown Source)
.

Error in ==> sendmail>readmsg at 377
msg=char(readLine(in));

Error in ==> sendmail at 125
[status, code] = okSMTP(readmsg(in));

I know that it has something to do with accessing the email account and I have tried setting different properties but the error is still occurring. Does anyone have any idea how to fix this? Thanks

23 Jan 2008 Yokesh R  
17 Feb 2008 vatsla k  
02 Mar 2008 saint pierre gadiano

good

13 May 2008 Jason Merrill

As an alternative, follow these instructions to set up sendmail:

http://www.mathworks.com/support/solutions/data/1-3PRRDV.html

and then use teleflip.com, a free e-mail to SMS converter:

sendmail('5555555555@teleflip.com','','Calculation Finished')

06 Mar 2009 farah

How to set the number...
it give me an error
??? Input argument "number" is undefined.

Error in ==> send_text_message at 38
number = strrep(number, '-', '');
 

10 Jun 2009 Sherif

Excellent work.
I am in Canada, and my cell company is Rogers, and the email address they use is '@pcs.rogers.com'. I added the following line, and it worked fine.
 
case 'rogers'; emailto = strcat(number,'@pcs.rogers.com');

11 Jun 2009 Rene

dont work at all

??? Error using ==> sendmail at 168
Could not connect to SMTP host: smtp.gmail.com, port: 25;
Connection timed out: connect

Error in ==> send_text_message at 82
sendmail(emailto,subject,message)

13 Jun 2009 Greg

I get the same error message

??? Error using ==> sendmail
Could not establish connection with smtp.gmail.com on port 25.

01 Oct 2009 Brian Keats

I get the following error:
??? Error using ==> sendmail at 168
Exception reading response;
Connection reset
Anyone know how to fix it?

30 Oct 2009 Alec

I get the ??? Error using ==> sendmail at 168
Exception reading response;
Connection reset
 also... Gmail must have changed the port #...

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
text mesage Ke Feng 22 Oct 2008 09:29:33
cell phone Ke Feng 22 Oct 2008 09:29:33
email Ke Feng 22 Oct 2008 09:29:33
sms Ke Feng 22 Oct 2008 09:29:33
gmail Ke Feng 22 Oct 2008 09:29:33
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com