skip to Main Content

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 (https://github.com/laravel/framework/issues/39686), but the I’m a little bit confused because I don’t see any entry in my composer.json file and yet Swiftmailer is already part of the project.

Error message

3

Answers


  1. Please upgrade to Swiftmailer 6.3.0 which provides PHP 8.1 support.

    Login or Signup to reply.
  2. I also faced the same problem I just upgraded my swiftmailer by this command

    composer require "swiftmailer/swiftmailer:^6.3"
    
    Login or Signup to reply.
  3. 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search