Video explains how to send email through MATLAB. In this video it explains to configure the MALTAB with the gmail/ google SMTP server. This video also shows how to test the internet connection from within MATLAB.
We will be glad to hear from you regarding any query, suggestions or appreciations at: programmerworld1990@gmail.com
Source code:
% SendEmail
setpref(‘Internet’,’SMTP_Server’,’smtp.gmail.com’);
setpref(‘Internet’,’E_mail’,’abcd@gmail.com’); % Need to give the email IDprops = java.lang.System.getProperties;
props.setProperty(‘mail.smtp.auth’,’true’);
props.setProperty(‘mail.smtp.starttls.enable’,’true’);setpref(‘Internet’,’SMTP_Username’,’abcd@gmail.com’); % Need to give the email ID
setpref(‘Internet’,’SMTP_Password’,’**********’); % Need to give the passwordsendmail(‘abcd@gmail.com’, ‘MATLAB Test’, ‘Test Email’)
i need to give my password to send an email wtf
I think the application will connect to your email account (through SMTP call) to send the email and hence it will need the password.
Cheers
Programmer World
–
hey there, i got an error stating:
Unrecognized function or variable ‘getproperties’.
Error in myEmail (line 6)
props = java.lang.System.getproperties;
what should i do to get the above statement work?
Try with the below line:
props = java.lang.System.getProperties;
‘P’ capital in getProperties. Commands in Matlab are case sensitive.
Cheers
Programmer World
–