Saturday 23 February 2019

Automatic mail Generation from MATLAB

                      Automaticmail

Source code:

[mail,password]=mailpass()
setpref('Internet','SMTP_Server','smtp.gmail.com');
setpref('Internet','E_mail',mail);
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', 'javax.net.ssl.SSLSocketFactory');
props.setProperty('mail.smtp.socketFactory.port','465');
% Send the email.  Note that the first input is the address you are sending the email to
sendmail(mail,'Test from SELVA','Hello! This is a test from SELVA!')

                                                   Software Requirement
1.MATLAB 2014A



Automaticmail