Skip to content

get 'Reject due to policy restrictions' from mail servers #273

@ednt

Description

@ednt

Bug Report

get 'Reject due to policy restrictions' from mail servers

The composer.json file does not contain the version of laminas-mail. (not good)
But the fault is also inside the github master file.

Summary

We send out many e-mails to customers and 30% come back as undeliverable.
We use ESPOCRM which uses laminas-mail.

Current behavior

The current from header looks like

From: =?UTF-8?Q?abc@xy.z?= <abc@xy.z>

How to reproduce

Send an e-mail to web.de for example, with a $name and $email

Expected behavior

To be accepted by the mail servers it should look like

From: "=?UTF-8?Q?abc@xy.z?=" <abc@xy.z>

We solved the issue by changing line 215 of src/Header/AbstractAddressList.php from

$emails[] = sprintf('%s <%s>', $name, $email);

To

$emails[] = sprintf('"%s" <%s>', $name, $email);

Best regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions