필터 지우기
필터 지우기

Regarding sending mail to GMAIL

조회 수: 2 (최근 30일)
THANGARASU P
THANGARASU P 2013년 7월 28일
Dear sir,
I have tried to send mail using existing code available from website. But i am unable use. Following error i get so please give me suggestion .
whether any setting need to be changed to mail via gmail or from matlab(2010b) please suggest these too. I could not find any mistakes in code
code I Used :(took from mathworks website)
myaddress = 'vvv@gmail.com';///
mypassword = 'yyyyy'; /// password not shared
setpref('Internet','E_mail',myaddress);
setpref('Internet','SMTP_Server','smtp.gmail.com');
setpref('Internet','SMTP_Username',myaddress);
setpref('Internet','SMTP_Password',mypassword);
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(myaddress, 'Gmail Test', 'This is a test message.');
Error I got:
E rror using sendmail (line 164) Exception reading response; sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Error in gamil_test_test (line 38)
sendmail(myaddress, 'Gmail Test', 'This is a test message.');

답변 (1개)

Walter Roberson
Walter Roberson 2013년 7월 28일

카테고리

Help CenterFile Exchange에서 Web Services에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by