sending E-mail error
Mostrar comentarios más antiguos
Türk:
Merhaba;
MATLAB ile e-posta göndermek istiyorum ama bu kodları buldum (Sendmail kullanarak hata (satır 172)
İstisna okuma cevabı;
sun.security.validator.ValidatorException: PKIX yolu oluşturulamadı: sun.security.provider.certpath.SunCertPathBuilderException: geçerli bulunamıyor
istenen hedefe yönelik sertifika yolu
Bu hatayla karşılaştığım sorun nedir?
Teşekkürler...
English:
Hi;
I want to send e-mail with MATLAB but I found these codes (Error using sendmail (line 172)
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 )
What's the problem I'm having with this error?
Thanks...
%
% parameters
mail = 'mymail@gmail.com'; % my gmail address
password = 'mypassword'; % my gmail password
host = 'smtp.mail.com';
% preferences
setpref('Internet','SMTP_Server', host);
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');
% Send the email
sendmail(mail,'Test from MATLAB','Hello! This is a test from MATLAB!')
2 comentarios
cem sare
el 30 de Nov. de 2018
mark filan
el 31 de Jul. de 2019
Enabling access for "less secure apps" means that the client/app doesn't use OAuth 2.0 . OAuth 2.0 is the industry-standard protocol for authorization. When you sign in with OAuth 2.0, you sign in to Google's system directly. In OAuth 2.0 , you authenticate directly to Gmail with your credentials and authorize an app to do certain things. The third-party app only sees an authorization token provided by Google as proof that you authenticated correctly and agreed to authorize that app.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Web Services en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!