symfony / swiftmailer-bundle

Symfony Swiftmailer Bundle
https://symfony.com/swiftmailer-bundle
MIT License
1.56k stars 151 forks source link

Swift_RfcComplianceException: Message: "Invalid ID given... #255

Closed ghost closed 4 years ago

ghost commented 6 years ago

Hi guys, a few days ago I have a issue with sending emails. I execute the command ( swiftmailer:spool:send --message-limit=15 --env=prod )and it returns this output:

"class": "Swift_RfcComplianceException",
    "message": "Invalid ID given <e21d3100321a9b78b1f171e49d02b8f7@>",
    "code": 0,
    "file": "/home/xxxxxx/public_html/shared/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/IdentificationHeader.php:183",
    "trace": [
        "/home/xxxxxx/public_html/shared/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/IdentificationHeader.php:128",

composer.json: "symfony/symfony": "~3.0", "symfony/swiftmailer-bundle": "^3.2", "cspoo/swiftmailer-mailgun-bundle": "^1.0"

Can someone help me?

wskc commented 5 years ago

Hey @andreandev , i encountered a similar problem, but my ID was something like e21d3100321a9b78b1f171e49d02b8f7@**-** (note the -). swiftmailer usually generates the domain part of this ID out of the server name and defaults to "swift.generated". In my case, i had "-" as the server_name in my nginx configuration. So if you're using nginx try replacing (or removing if applicable) the server_name in your configuration (idk if this happens with virtualhosts using apache).