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.
This simple function is extremely useful if you have simulations that take an indeterminate amount of time to finish. I put a call to this function at the end of my neural network training scripts and go get coffee while it runs. It is also easy to modify to send yourself an e-mail instead. The one thing I still need to try is using this to send variable status updates as a code runs, but I think it provides the architecture to do so.
A very useful part of this submission is the permission setup (setpref) for Gmail. Matlab's documentation did not result in my being able to send texts from Gmail, but Ke Feng's permissions did. Interestingly I can text all kinds of carriers from my Gmail account but not from my work email, maybe because the authentication level is higher. If you have to text a bunch of people on different carriers and are having trouble, try doing it from Gmail using Ke Feng's permissions.
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');
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
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.
17 Dec 2007
Bassam Abdelnabi
06 Dec 2007
tariq-tam TAM
06 Dec 2007
tariq tam
thank you
05 Dec 2007
janet looloo
good
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.
01 Oct 2007
Nick C
This would be awsome if I were in the US :(
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.