Error 550 - email not sending

Hey guys, I am going crazy trying to figure this out. I had this working fine on v4. Been fighting trying to get invoices emailed in v5 for about a month now, and need a fresh set of eyes. I am getting error 550 Relaying denied. I have tried gmail personal type act and my business email (Zoho) with app password.
any Ideas whats blocking it or what I am doing wrong (probably what Im doing wrong). I did try with and with out quotes

Mail options

MAIL_FROM_NAME=“company name”


Have you seen the info here:

@david do you have any suggestions?

Hi Hillel,I have, but ill run through it again just to make sure I am not missing anything. Brain is fried from work, so I am probbaly missing something stupid. I had the quotes initially setup how it is in that template. Just fyi, not sure if it matters. I am running Docker on UnRAID. v4 was working with gmail, and will try switch back to that again (i initially had v5 on the same gmail act). Appreciate the input.

not sure if this means anything, or could be the cause.
ERROR: Unsupported cipher or incorrect key length…

I am able to access and create invoices ok. I deleted all gmail app keys and regenerated them for apps, and one of my other apps are working fine. I have also tried changing my public static IP with no change in results.

Ive gone thru everything several times, trying both with Zoho and personal GMail. Both throw same error.
When ever I make a change, I run php artisan optimize, then reboot the docker. Is there a step I am missing to refresh the settings to have them take effect?

That’s the correct step, @david any ideas?

Are you seeing any errors at all in the activity/system logs tab?

Hi @david, Yes, that’s where I was seeing the error 550, relaying denied message. I don’t see anything in the larvel logs and can upload any logs that would help. I can do a test run on G-Suite if that would help. But I can’t use that permanently. I did contact Zoho, and they don’t see anything being blocked on their end.



I’m not sure, we’ve seen a few queries about people having issues when they attempt to use relay servers, one thing to check is to ensure the FROM_EMAIL is the same as the outbound email address you are attempting to use.

So just an update. I also tried to setup SendGrid, and I am getting the same error.
I currently have .env placed in /storage
below is full .env redacted and last part of Larvel log, hoping it can bring some insight.
I do have the debug on, but is it supposed to be at the bottom like v4?

# IN application vars
APP_NAME="Ninja Invoicing"




# DB connection
DB_HOST=db host
DB_DATABASE= db name
DB_PASSWORD=user pass

# Create initial user
# Default to these values if empty
# IN_PASSWORD=changeme!

# Mail options
# MAIL_PASSWORD=password
# MAIL_FROM_NAME='company'

# Mail options


# V4 env vars
# DB_STRICT=false

Last portion of larvel log

[2023-01-08 23:30:01] production.INFO: updating currencies  
[2023-01-09 06:20:00] production.INFO: Performing Autobilling 2023-01-09 06:20:00  
[2023-01-09 06:20:03] production.INFO: Auto Bill - balance remains to be paid!! - 75.000000  
[2023-01-09 06:20:03] production.INFO: Auto Bill - balance remains to be paid!! - 67.780000  
[2023-01-09 06:20:03] production.INFO: Auto Bill - balance remains to be paid!! - 35.000000  
[2023-01-09 17:38:00] production.ERROR: Unable to generate the raw PDF {"exception":"[object] (App\\Exceptions\\FilePermissionsFailure(code: 0): Unable to generate the raw PDF at /var/www/app/app/Jobs/Entity/CreateRawPdf.php:212)
#0 /var/www/app/app/Mail/Engine/InvoiceEmailEngine.php(131): App\\Jobs\\Entity\\CreateRawPdf->handle()
#1 /var/www/app/app/Jobs/Entity/EmailEntity.php(177): App\\Mail\\Engine\\InvoiceEmailEngine->build()
#2 /var/www/app/app/Jobs/Entity/EmailEntity.php(108): App\\Jobs\\Entity\\EmailEntity->resolveEmailBuilder()
#3 /var/www/app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\\Jobs\\Entity\\EmailEntity->handle()
#4 /var/www/app/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#5 /var/www/app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure()
#6 /var/www/app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\\Container\\BoundMethod::callBoundMethod()
#7 /var/www/app/vendor/laravel/framework/src/Illuminate/Container/Container.php(651): Illuminate\\Container\\BoundMethod::call()
#8 /var/www/app/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(128): Illuminate\\Container\\Container->call()
#9 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\\Bus\\Dispatcher->Illuminate\\Bus\\{closure}()
#10 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#11 /var/www/app/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(132): Illuminate\\Pipeline\\Pipeline->then()
#12 /var/www/app/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(124): Illuminate\\Bus\\Dispatcher->dispatchNow()
#13 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\\Queue\\CallQueuedHandler->Illuminate\\Queue\\{closure}()
#14 /var/www/app/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}()
#15 /var/www/app/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(126): Illuminate\\Pipeline\\Pipeline->then()
#16 /var/www/app/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(70): Illuminate\\Queue\\CallQueuedHandler->dispatchThroughMiddleware()
#17 /var/www/app/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(98): Illuminate\\Queue\\CallQueuedHandler->call()
#18 /var/www/app/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(425): Illuminate\\Queue\\Jobs\\Job->fire()
#19 /var/www/app/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(375): Illuminate\\Queue\\Worker->process()
#20 /var/www/app/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(173): Illuminate\\Queue\\Worker->runJob()
#21 /var/www/app/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(146): Illuminate\\Queue\\Worker->daemon()
#22 /var/www/app/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(130): Illuminate\\Queue\\Console\\WorkCommand->runWorker()
#23 /var/www/app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\\Queue\\Console\\WorkCommand->handle()
#24 /var/www/app/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#25 /var/www/app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure()
#26 /var/www/app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\\Container\\BoundMethod::callBoundMethod()
#27 /var/www/app/vendor/laravel/framework/src/Illuminate/Container/Container.php(651): Illuminate\\Container\\BoundMethod::call()
#28 /var/www/app/vendor/laravel/framework/src/Illuminate/Console/Command.php(182): Illuminate\\Container\\Container->call()
#29 /var/www/app/vendor/symfony/console/Command/Command.php(312): Illuminate\\Console\\Command->execute()
#30 /var/www/app/vendor/laravel/framework/src/Illuminate/Console/Command.php(152): Symfony\\Component\\Console\\Command\\Command->run()
#31 /var/www/app/vendor/symfony/console/Application.php(1020): Illuminate\\Console\\Command->run()
#32 /var/www/app/vendor/symfony/console/Application.php(312): Symfony\\Component\\Console\\Application->doRunCommand()
#33 /var/www/app/vendor/symfony/console/Application.php(168): Symfony\\Component\\Console\\Application->doRun()
#34 /var/www/app/vendor/laravel/framework/src/Illuminate/Console/Application.php(102): Symfony\\Component\\Console\\Application->run()
#35 /var/www/app/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(155): Illuminate\\Console\\Application->run()
#36 /var/www/app/artisan(37): Illuminate\\Foundation\\Console\\Kernel->handle()
#37 {main}

So I think it has to do with the UnRAID version I got. I looked thru the post, and other people had the same issue, and the creator stated he doesnt email from the system.

Therefore, I am going to build a Ubunutu VM. I tried once and failed, so will try again. I did notice v5.5 requires PHP 8, while the docs show 7.4 (self-host-installation) So do I need to install both, or just PHP8.1

I think I remember having an issue with unquoted values when trying to connect to gmail.
This is my working config

MAIL_FROM_NAME="Robert Went"

I don’t use the MAIL_FROM_ADDRESS option.


I think the failure here is happening before your app even tries to get to the mailserver.

Can you try disabling all attachments / send with PDF option in Settings > Email settings.

It looks like the system is failing to generate the PDF to attach to the email.

Hi @david . I couldn’t even get that far. I wasn’t even able to log in.

Right now I have ubuntu installed (using this, and trying to figure out why cert isn’t passing like before. I think permissions are good for cert and ninja folders. I’m probably going to start all over again. I would like to get the react version working as well thats why.

Question, just to make sure. I only need PHP 8.1 (and dependencies) correct? I don’t need 7.4? (just checking since he has 7.4 listed, but main page has 8.1 (so i skipped 7.4

Much Mahalos


v5 only supports PHP 8.1

I’m looking into the react issue currently, hopefully we have a solution soon.

@david Thanks for confirming the PHP ver. verification. Just wanted to make sure I am not doing anything wrong on that part.
Thanks for all your hard work on this.
I’ll report back the outcome after I reinstall. :slight_smile:

Hey David, I was just curious if you guys offer any install services. I’m not a linux person, and I am getting stressed out and going crazy trying to make this work. I have the SQL db saved. I didnt save the json backup, which i can rebuild the faulty docker and save if need.

I dont really make make much money on anything as I only have 1 client that’s constant as i do things on the side, and work full time. any other is family for reimbursement for cell phone.
I tried following the guide, updating sections i noticed from php 7.4 to php 8.1.

I currently already have nginx installed on unraid docker. on. 72.x.x.50, and i was putting ninja on 72.x.x.52. (i have 72.x.x.50-54) with its own nginx.


I’d suggest either trying Docker, or use a installer like Softaculous to manage this for you.

We don’t offer installation as a service.

@david Thanks I will try docker under unraid again, using what you sent earlier. Thanks so much for your help. If I ever figure it out, I will post what I did… Or maybe just try learn real docker… Was just trying to learn more linux stuff (which i did a little).

Thanks @david. I got it working. UnRAID requires the ENV variables that are in the file in the Docker settings (exception is app key from what I can tell)

1 Like