フィルターのクリア

Why am I getting this error when I try to send an email using sendmail?

7 ビュー (過去 30 日間)
Nicholas Sullivan
Nicholas Sullivan 2015 年 6 月 9 日
回答済み: Nicholas Sullivan 2015 年 6 月 9 日
This is the error message I get:
Error using sendmail (line 171) Could not connect to SMTP host: [smtp server], port: 25; Permission denied: connect
I have tried allowing MATLAB through my firewall, changing the sending email address, and different combinations of the following code:
66 - setpref('Internet','E_mail','[my email address]');
67 - setpref('Internet','SMTP_Server','[smtp server');
68 - setpref('Internet','SMTP_Username','[my email address]');
69 - setpref('Internet','SMTP_Password','[my password]');
70 - props = java.lang.System.getProperties;
71 - props.setProperty('mail.smtp.auth','true');
72 - props.setProperty('mail.smtp.socketFactory.class','javax.net.ssl.SSLSocketFactory');
73 - props.setProperty('mail.smtp.socketFactory.port','465');
74 - sendmail('[recipient address]','',{'attachment.png'});
What could be causing this error?
  1 件のコメント
Nicholas Sullivan
Nicholas Sullivan 2015 年 6 月 9 日
I have also tried running it without lines 72 and 73

サインインしてコメントする。

採用された回答

Nicholas Sullivan
Nicholas Sullivan 2015 年 6 月 9 日

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeWeb Services についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by