Using gmail after May 30, 2022
36 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Joseph Hejl
am 15 Mär. 2022
Beantwortet: Ivan
am 21 Nov. 2023
I am currently using Matlab to send emails using Gmail with "less secure apps" selected to "ON" under Google Security. This topic has been discussed at length in several threads and I currently have no problems, however, as per Google: "To help keep your account secure, starting May 30, 2022, Google will no longer support the use of third-party apps or devices which ask you to sign in to your Google Account using only your username and password."
So, after May, 30th, I will no longer be able to use Matlab to send emails via Gmail. Does anyone have a work around for this?
6 Kommentare
Rik
am 16 Mär. 2022
It sounds like you should post that last comment as an answer. That way other people can try this solution as well.
Akzeptierte Antwort
Joseph Hejl
am 16 Mär. 2022
6 Kommentare
YANBO JIANG
am 29 Jul. 2023
Could you please provide the current whole setting up to send email in MATLAB?
Weitere Antworten (1)
Ivan
am 21 Nov. 2023
In my side works perfect the folowing code
server='smtp.gmail.com';
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.auth', 'true' );
props.setProperty( 'mail.smtp.user', mail );
props.setProperty( 'mail.smtp.password', password );
props.setProperty( 'mail.smtp.host', server );
props.setProperty( 'mail.smtp.port', '587' );
props.setProperty( 'mail.smtp.starttls.enable', 'true' );
Also,pay attention that “App Paswords”includesspaces between groups of numbers when you copy it from Google.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Web Services finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!