Error in sending mail through matlab
Im trying to send a mail through matlab but im keep getting this error
my code was like
mail = ‘myuniversitymail@univ.edu’;
password = ‘mypassword’;
mailingList = {‘receivermail@gmail.com’};
server = ‘smtp-mail.outlook.com’;
props = java.lang.System.getProperties;
props.setProperty(‘mail.smtp.port’,’587′);
props.setProperty(‘mail.smtp.starttls.enable’,’true’);
props.setProperty(‘mail.smtp.ssl.trust’, ‘*’)
setpref(‘Internet’,’E_mail’,mail);
setpref(‘Internet’,’SMTP_Server’,server);
setpref(‘Internet’,’SMTP_Username’,mail);
setpref(‘Internet’,’SMTP_Password’,password);
messageBody = sprintf(‘ Good morning ‘);
messageBody = sprintf(‘%snn Here is the data analysis from yesterdays data. Have a great day!’, messageBody);
messageBody = sprintf(‘%snnn *This email was generated and sent automatically via MATLAB’, messageBody);
sendmail(mailingList,"Data Analysis",messageBody,filename);
And the error is like,
Error using sendmail (line 184)
Can’t send command to SMTP host;
No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
Error in project (line 73)
sendmail(mailingList,"Data Analysis",messageBody,filename);
Pls help me to resolve this issue asap….Im trying to send a mail through matlab but im keep getting this error
my code was like
mail = ‘myuniversitymail@univ.edu’;
password = ‘mypassword’;
mailingList = {‘receivermail@gmail.com’};
server = ‘smtp-mail.outlook.com’;
props = java.lang.System.getProperties;
props.setProperty(‘mail.smtp.port’,’587′);
props.setProperty(‘mail.smtp.starttls.enable’,’true’);
props.setProperty(‘mail.smtp.ssl.trust’, ‘*’)
setpref(‘Internet’,’E_mail’,mail);
setpref(‘Internet’,’SMTP_Server’,server);
setpref(‘Internet’,’SMTP_Username’,mail);
setpref(‘Internet’,’SMTP_Password’,password);
messageBody = sprintf(‘ Good morning ‘);
messageBody = sprintf(‘%snn Here is the data analysis from yesterdays data. Have a great day!’, messageBody);
messageBody = sprintf(‘%snnn *This email was generated and sent automatically via MATLAB’, messageBody);
sendmail(mailingList,"Data Analysis",messageBody,filename);
And the error is like,
Error using sendmail (line 184)
Can’t send command to SMTP host;
No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
Error in project (line 73)
sendmail(mailingList,"Data Analysis",messageBody,filename);
Pls help me to resolve this issue asap…. Im trying to send a mail through matlab but im keep getting this error
my code was like
mail = ‘myuniversitymail@univ.edu’;
password = ‘mypassword’;
mailingList = {‘receivermail@gmail.com’};
server = ‘smtp-mail.outlook.com’;
props = java.lang.System.getProperties;
props.setProperty(‘mail.smtp.port’,’587′);
props.setProperty(‘mail.smtp.starttls.enable’,’true’);
props.setProperty(‘mail.smtp.ssl.trust’, ‘*’)
setpref(‘Internet’,’E_mail’,mail);
setpref(‘Internet’,’SMTP_Server’,server);
setpref(‘Internet’,’SMTP_Username’,mail);
setpref(‘Internet’,’SMTP_Password’,password);
messageBody = sprintf(‘ Good morning ‘);
messageBody = sprintf(‘%snn Here is the data analysis from yesterdays data. Have a great day!’, messageBody);
messageBody = sprintf(‘%snnn *This email was generated and sent automatically via MATLAB’, messageBody);
sendmail(mailingList,"Data Analysis",messageBody,filename);
And the error is like,
Error using sendmail (line 184)
Can’t send command to SMTP host;
No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
Error in project (line 73)
sendmail(mailingList,"Data Analysis",messageBody,filename);
Pls help me to resolve this issue asap…. matlab error, sendmail error, smtp host, sendmail, mail MATLAB Answers — New Questions