Using e-mail with matlab
Show older comments
Hi,
I would truly appreciate it if anyone may help me with this. I would like to know what, perhaps, is wrong with the collection of code herein provided to send e-mails from matlab. In this code, I am using my puma31sumsum@yahoo.com account and have not included some information, such as my password or the e-mail to which I am sending, for privacy purposes:
mail_address = 'puma31sumsum@yahoo.com'; user_name = 'puma31sumsum'; password = '*******'; smtp_server = 'mail.yahoo.com';
setpref('Internet', 'E_mail', mail_address); setpref('Internet', 'SMTP_Username', user_name); setpref('Internet', 'SMTP_Password', password); setpref('Internet', 'SMTP_Server', smtp_server); props = java.lang.System.getProperties; props.setProperty('mail.smtp.auth', 'true'); props.setProperty('mail.smtp.socketFactory.class', 'javax.net.ssl.SSLSocketFactory'); props.setProperty('mail.smtp.socketFactory.port', '465'); sendmail('another email', 'Mail from me','Hello')
I am getting the following message when I try to run it:
Error in ==> sendmail at 17 sendmail('another email', 'Mail from me','Hello') ??? Attempt to execute SCRIPT sendmail as a function
In addition to this, I would like to know how I may run a loop. That is, if I wanted MATLAB to send out an e-mail every 30 seconds, how would I do this? Thank you very much.
1 Comment
Jan
on 4 Sep 2012
Please format your code. See the "? Help" button for instructions.
Accepted Answer
More Answers (0)
Categories
Find more on Web Services in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!