Craft 4 to 5 upgrade, Symfony Mailer error on deployment #15342
Unanswered
emilyo-cogapp
asked this question in
Q&A
Replies: 1 comment 5 replies
-
Craft 5 upgraded yiisoft/yii2-symfonymailer from v2 to v4 (#14239), so there could be some breaking changes as part of that, although it’s not noted in the changelog. Which specific transport adapter are you using? |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I just upgraded from Craft 4 to 5 and when deploying the site to our staging environment I got this error in
storage/logs/console.log
:Symfony\Component\Mailer\Transport\Dsn::__construct(): Argument #2 ($host) must be of type string, null given
and the frontend was erroring.The site's hosted on Platform.sh so I was able to fix it by enabling their 'allow outgoing mail' setting as this sets the
$host
variable I believe, but previously we had left this blank and had no errors when deploying.I'm just trying to figure out why this error might have been thrown now and not before, so I'm wondering whether there's something to do with a change in either how Craft 5 implements email or even an update in the Symfony mailer or something else along the line to cause this to now throw an error? Any ideas appreciated 😅
Beta Was this translation helpful? Give feedback.
All reactions