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

44 ビュー (過去 30 日間)
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.

採用された回答

Ganesh
Ganesh 2024 年 1 月 2 日
編集済み: Ganesh 2024 年 1 月 3 日
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 件のコメント
oran
oran 2024 年 1 月 2 日
Thank you @Ganesh - are there any email services that accept multiple to headers currently that I can use in the meantime?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeWeb Services についてさらに検索

タグ

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by