RfcComplianceException: RFC 2822

Created on 10 January 2022, almost 3 years ago
Updated 18 February 2023, almost 2 years ago

Problem/Motivation

Mimemail produces RfcComplianceException when no "Return-Path" is provided or when this one equals site config email.
Thus triggers exception as follows:
Symfony\Component\Mime\Exception\RfcComplianceException: Email "<contact@mail.com>" does not comply with addr-spec of RFC 2822. in Symfony\Component\Mime\Address->__construct() (line 56 of ../vendor/symfony/mime/Address.php).

Steps to reproduce

None ? (except using mimail as email formatter)
In mailManager->doMail, From, Sender and Return-path are set as site e-mail (to avoid the mail to be treated as spam). Then they undoubtedly end up being rewritten in MimeMailFormatHelper as Return-Path = "<contact@mail.com>" in ::mimeMailHeaders().

Proposed resolution

Remove the wrapper "<>" when rewriting Return-Path.

Remaining tasks

This should be doubled-checked, maybe from a maintainer of the module.

🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

🇭🇷Croatia Aporie

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024