Error: header_reply_to_contains_too_many_addresses (reply-to issue)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jacao
    Junior Member
    • Mar 2024
    • 25

    #1

    Error: header_reply_to_contains_too_many_addresses (reply-to issue)

    Hello!

    We have encountered an issue in the mass mailing module (Espo 9.1.2, AP 3.9.0). Even when the Reply-To Address and Reply-To Name fields are empty, we are getting the following error:

    Code:
    [2025-05-15 08:35:01] ERROR: Mass Email, send item: 0, unknownError
    [2025-05-15 08:35:01] ERROR: (554) Email sending error: Expected response code "250" but got code "554", with message "554 Error: header_reply_to_contains_too_many_addresses". :: /var/www/html/vendor/symfony/mailer/Transport/Smtp/SmtpTransport.php(338)
    [object] (Symfony\Component\Mailer\Exception\UnexpectedResponseException(code: 554): Expected response code "250" but got code "554", with message "554 Error: header_reply_to_contains_too_many_addresses". at /var/www/html/vendor/symfony/mailer/Transport/Smtp/SmtpTransport.php:338)
    We used the SMTP server provided by our transactional email service provider for sending. While there are some restrictions on their side, we were surprised by the error message about multiple addresses in the Reply-To field, especially since we did not provide any.

    We ran tests using our own SMTP server, and here is what we found: the address from the From Address field is being added to the Reply-To field. Examples:

    If the Reply-To field in the mass mail was empty, the header looks like this:

    Code:
    Reply-To: info@ourdomain.com, info@ourdomain.com
    If the Reply-To fields were filled, the header looks like this:

    Code:
    From: Info <info@ourdomain.com>
    Sender: info@ourdomain.com
    Reply-To: Someone <info@ourdomain.com>, info@ourdomain.com
    It seems that the Reply-To header is being constructed incorrectly when generating the message header and always using From Address (and double it).

    Moreover, the same issue occurs in Flowcharts, in the Send Message Task block, where we can specify a Reply-To address. If we do so, the email fails to send and we get an unknown error in the log:

    Code:
    {main} [2025-05-15 09:47:01] ERROR: (500) Process 6825b80c451337076, element d7ks9hzehb, send message error: Workflow[][sendEmail]: unknownError. :: /var/www/html/custom/Espo/Modules/Advanced/Tools/Workflow/SendEmailService.php(257) [object] (Espo\Core\Exceptions\Error(code: 500): Workflow[][sendEmail]: unknownError. at /var/www/html/custom/Espo/Modules/Advanced/Tools/Workflow/SendEmailService.php:257)


    I would be very grateful for any help.

    Regards, Jacek
    Last edited by jacao; Today, 10:27 AM.
  • lazovic
    Super Moderator
    • Jan 2022
    • 1004

    #2
    Hi jacao,

    Unfortunately, I can't reproduce your situation with mass emails, workflows, or flowcharts. I don't get any errors, and the Reply To address is filled in correctly in all cases.

    Comment

    • lazovic
      Super Moderator
      • Jan 2022
      • 1004

      #3
      jacao,

      I use regular email addresses, Gmail ones; maybe that's why I can't reproduce the problems, because I don't have my own email provider with complex settings. For now I think you need to analyze the issue on their side.

      Comment

      Working...