필터 지우기
필터 지우기

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

조회 수: 99 (최근 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 CenterFile Exchange에서 Web Services에 대해 자세히 알아보기

태그

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by