How to use sendmail on macOS (Matlab 2017a)?
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi,
I'm trying to send an email using sendmail function. Following setup works perfectly fine on Windows 10, but I'm unable to make it work on macOS Sierra.
mail = 'email@yahoo.com';
password = 'password';
setpref('Internet','SMTP_Server','smtp.mail.yahoo.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');
sendmail(mail, 'My message', 'My message');
On macOS it throws following error.
Error using sendmail (line 169)
501 5.5.4 Invalid argument
Does anyone have an idea how to solve it?
0 Commenti
Risposte (1)
Vedere anche
Categorie
Scopri di più su Web Services in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!