Home > Blockchain >  Error when sending mail with Laravel and PHP 8.1
Error when sending mail with Laravel and PHP 8.1

Time:11-30

My server (Ubuntu 20.4) updated and this impacted the version of PHP which was upgraded to 8.1 and since I got this error message when I try to send a mail from my Laravel application:

strtolower(): Passing null to parameter #1 ($string) of type string is deprecated

My current PHP version is 8.1 and Laravel 8.64.0.

Need help!

I looked in this forum (Error message

CodePudding user response:

I also faced the same problem I just upgraded my swiftmailer by this command

composer require "swiftmailer/swiftmailer:^6.3"

CodePudding user response:

Please upgrade to Swiftmailer 6.3.0 which provides PHP 8.1 support.

CodePudding user response:

If swiftmailer is not in your composer.json, then how is it a part of your project? Kindly verify. For getting the latest stable version you can simply use the command

composer require swiftmailer/swiftmailer

Just FYI, this package is abandoned now and no more maintained. Instead you should use symfony/mailer.

  • Related