Email not working new install v5.1.61

Hi there,

I’m excited to use Invoice Ninja, but having problems getting emails to send - this applies to both new User invitations and sending Invoices.

I was able to troubleshoot the issue with sending Invoices, as I’m seeing an Activity item each time I try to send the Invoice, which is showing the following error message: Address in mailbox given [] does not comply with RFC 2822, 3.6.2.

I am using the smtp Mailer, and my .env file is configured as follows for this section:

MAIL_MAILER=‘smtp’
MAIL_HOST=‘mail.shinobisolutions.com
MAIL_PORT=465
MAIL_USERNAME=admin@shinobisolutions.com
MAIL_PASSWORD=’[PASSWORD]’
MAIL_ENCRYPTION=‘tls’
MAIL_FROM_ADDRESS=‘ar@shinobi.solutions’
MAIL_FROM_NAME=‘Shinobi Accounts Receivable’

I have tried all the MAIL_* variables with and without enclosing single quotes, but it doesn’t seem to make much difference.

Please can somebody advise what I can do to fix this?

Thanks a million!!

Hi,

Maybe you needed to run php artisan optimize after changing the values?

Also, you may want to try updating to 5.1.62.

I use version v5.1.53-C47

Is updating a manual process? I cannot find it in softaculous the way others update automatically.

Hi Hillel

Thanks for the suggestion. At the moment I have optimize running as a cron job every minute, as I don’t have access to command line in a multi-hosted cpanel environment. It hasn’t helped at all, and it doesn’t explain the error message I’m getting.

Do you have any other ideas what could be causing this?

Many thanks!

Maybe try testing with a different provider?

As in different email provider? Or different hosting provider?

A different email provider

I have access to the current email server and sending emails from a macos client with the same settings works fine. That said, I just tried with smtp.gmail.com twice to see if anything changes, and I’m still getting the same error message: Address in mailbox given [] does not comply with RFC 2822, 3.6.2.

New .env setup is as follows:

MAIL_MAILER=‘smtp’
MAIL_HOST=‘smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=‘robin@shinobi.solutions’
MAIL_PASSWORD=’[PASSWORD]’
MAIL_ENCRYPTION=‘tls’
MAIL_FROM_ADDRESS=‘ar@shinobi.solutions’
MAIL_FROM_NAME=‘Shinobi Accounts Receivable’

@david do you have any ideas?

It seems to be a laravel level issue. I found this on stackoverflow:

If what they are saying about string vs array here, it doesn’t seem like a problem that is going to be solved locally by me…?

Thanks a million

@SalesNinja

Is there any other additional output in storage/logs/laravel.log?

Hi @David,

this is the entirety of my storage/logs/laravel.log file:

The last entry is about 4.5 hours ago in my timezone.

I’m fairly sure my .env file is not being read. I’ve just tried editing the database name to be incorrect and saved it, but everything still works correctly.

I have a cron job running every minute to do the following (it is a multi-hosted cpanel environment):

/opt/cpanel/ea-php73/root/usr/bin/php /home/[APP ROOT PATH]/ninja/artisan config:cache & /opt/cpanel/ea-php73/root/usr/bin/php /home/[APP ROOT PATH]/ninja/artisan config:clear

try deleting the contents of boostrap/cache

2 Likes

Funnily enough I just tried that, and it forced Setup to run. I entered all my details through the form, and it worked perfectly.

Do you have any idea how I can avoid this in future?

Thanks a million!

1 Like

Actually, it looks like my .env file is being read successfully with each change I make now.

Problem solved for now I think!

Thank you so much for your kind assistance!!

Is Bootstrap/cache found the app files?

Been Having the same problem, tried deleting the contents of bootstrap/cache. the domain now ran with an extended domain (https://target.domain/public/index.php#/), the # was additional. Help?