Sendmail error using gmail: 550-5.7.1 This message is not RFC 5322 compliant. There are multiple To headers.

48 vues (au cours des 30 derniers jours)
I have a code that compiles some data and plots, places it into a report, and then sends it to the intended receipients. I prefer using Matlab's internal sendmail function (hopefully) with a 'throwaway' Gmail address as opposed to Outlook using activeX due to it's cross-platform compatibility. Prior to April of 2023 I could send to multiple 'To' addresses using sendmail though my Gmail account, but since then I've not been able to, receving this error:
% Error using sendhtmlemail
% 550-5.7.1 This message is not RFC 5322 compliant. There are multiple To headers.
From Google documentation I can tell that this compliancy was enacted in April of 2023, matching my experience. I can send the emails to the receipients in a loop without issue, but then any responses to the messages lack all contributors. Is there any known work-around for this issue?
Using this setup for Gmail:
setpref('Internet','E_mail','foo@gmail.com');
setpref('Internet','SMTP_Server','smtp.gmail.com');
setpref('Internet','SMTP_Username','foo@gmail.com');
setpref('Internet','SMTP_Password','foopassword');
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');
I've been using a windows machine running outlook since the problem started, but was hoping to move back to a new apple silicon machine in 2024.
Thanks for any input.

Réponse acceptée

Ganesh
Ganesh le 2 Jan 2024
Modifié(e) : Ganesh le 3 Jan 2024
Hi Oran,
I understand that you are unable to enter multiple recipients, and this is a known issue due to the policy change made by Google.
At the moment, you do not have any workarounds for the same. The issue may be fixed in future releases of MATLAB.
Hope this helps!
  1 commentaire
oran
oran le 2 Jan 2024
Thank you @Ganesh - are there any email services that accept multiple to headers currently that I can use in the meantime?

Connectez-vous pour commenter.

Plus de réponses (0)

Produits


Version

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by