6.29.2011

Email yourself from Matlab

(I'm trying to get back in the habit of posting the most useful scripts from the piles of code I've been generating.  Step 1: start small.)

I wrote this little function to email me from Matlab.  Its very convenient for telling you when a long script finishes (or crashes).

It's simple to use: type "email_me('message to yourself')"

If you type no second argument (for the email's body) than it just sends you the time.

When you first install the function, open it up and change the first three lines of code to match your gmail account info.  You can specify that it sends email from a different account, so if you're anxious about typing your password somewhere, you can just open a new gmail account for Matlab-only uses.  [I'm not 100% sure if it will work for non-gmail accounts.]

No comments:

Post a Comment