Problem with : Error using sendmail; Can't send command to SMTP host; Remote host closed connection during handshake
古いコメントを表示
Hi I am trying to sendmail using the below, but i get :
Error using sendmail; Can't send command to SMTP host; Remote host closed connection during handshake
mail='#mail@mail';
password='#password';
server = '#smtp.server.com';
Subject = 'Test';
Text = 'Test';
setpref('Internet','E_mail', mail);
setpref('Internet','SMTP_Server', server);
setpref('Internet','SMTP_Username', mail);
setpref('Internet','SMTP_Password', password);
props = java.lang.System.getProperties;
props.setProperty('mail.smtp.port', '587');
props.setProperty('mail.smtp.starttls.enable','true');
sendmail('#mail@mail', Subject, Text)
Any ideas what the problem is and how to fix it?
Thank you
2 件のコメント
Amanda Fortuna
2024 年 4 月 15 日
Hi,
I'm having the same issue. Did you get this resolved? If so would you mind sharing the resolution please.
Thank you.
Rajanya
2024 年 8 月 9 日
Can you please specify the version of MATLAB that you are using and also the mail server you are trying to establish a connection on? I tried the same code as provided above using outlook smtp server on MATLAB R2024a and did not get any error.
Thanks.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Web Services についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!