close

How do we solve error 554 5.5.1 (no valid recipients) when using PHP Swiftmailer?

Hello Guys, How are you all? Hope You all Are Fine. Today we are talking about How do we solve error 554 5.5.1 (no valid recipients) when using PHP Swiftmailer? in php. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How do we solve error 554 5.5.1 (no valid recipients) when using PHP Swiftmailer Error Occurs?

Today we are talking about How do we solve error 554 5.5.1 (no valid recipients) when using PHP Swiftmailer? in php.

How To Solve do we solve error 554 5.5.1 (no valid recipients) when using PHP Swiftmailer Error ?

  1. How To Solve do we solve error 554 5.5.1 (no valid recipients) when using PHP Swiftmailer Error ?

    To Solve do we solve error 554 5.5.1 (no valid recipients) when using PHP Swiftmailer Error is the same as the “from” address in my custom notification mail class' toMail function

  2. How do we solve error 554 5.5.1 (no valid recipients) when using PHP Swiftmailer?

    To Solve do we solve error 554 5.5.1 (no valid recipients) when using PHP Swiftmailer Error is the same as the “from” address in my custom notification mail class' toMail function

Solution 1

I solved this issue by ensuring that the email address set in env file

[email protected]

is the same as the “from” address in my custom notification mail class’ toMail function

->from('[email protected]','My app name')

It seems as though some email services find it odd that the app is sending an email using one credential (env credentials) but a different email address is being masked as the sender.

A better solution would probably be to never set a “from” address in your notification classes.

Solution 2

I have solved this error (554) just adding to laravel (.env file) these 2 lines:

After this run this comand to flush mail cache config:

php artisan config:cache

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read

Leave a Comment