Sendmail error using gmail: 550-5.7.1 This message is not RFC 5322 compliant. There are multiple To headers.
조회 수: 48 (최근 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.
댓글 수: 1
Stefan de Groot
2024년 3월 21일
I just made a for loop to send multiple emails with each one recipient.
채택된 답변
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!
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Web Services에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!