Mail problems after updating to 5.2.*

Hi,

i am experiencing problems with mailing since updating to 5.2 somewhere.
i am using the docker version of the self-hosted.

However the following things i’ve tried to debug but didnt made it any clearer:

  • install a fresh installation (no docker) v5.2.19
  • updated to 5.3.0
  • tested to send mails over smtp: https://www.smtper.net/ (did send there)
  • removed all my data to click settings → account → remove data
  • checked laravel.log (when i hit send, i got the whole email html in the laravel log file)

i got the following in my .env file:

MAIL_DRIVER=smtp
MAIL_PORT=587
MAIL_ENCRYPTION=tls
MAIL_HOST=mail.intention.nl
MAIL_FROM_NAME=“Daniel”
MAIL_FROM_ADDRESS="test@example.com"
MAIL_USERNAME=“test@example.coml”
MAIL_PASSWORD=“myPassword”

Hi,

Have you seen the info here:

https://invoiceninja.github.io/docs/self-host-troubleshooting/#email-not-sending

Hi,

i indeed have seen that link.

i noticed that nothing appeared in the syslog when i sent a invoice.

so i tried to do the test on https://www.mail-tester.com/. and it gave me a 7.2 which seemed fine.

do you got any tips still what i can do to test where the problem comes from?

If the mail tester gave you a score doesn’t that imply emails are being sent?

yes! mails can be sent. however those tests i did werent being sent trough invoiceninja but trough my own mail client.

@david do you have any ideas?

Can you check inside invoice ninja, on the dashboard page there is a System Logs tab, this will detail any errors Invoice Ninja sees when attempting to send emails.

i’ve checked that tab, however when i “send a invoice” it doesnt say anything about it.

Tried to do that several time but the last log there was: “login”
So it wont trigger anything there in the log when i send a invoice

And what exactly is your email service provider? Service providers such as gmail often change access levels on the fly based on usage. For example, Gmail will allow you to connect with “less secure apps” when enabled, but then it will disable that permission if it hasn’t been used in “a while”. It’s frustrating, but there is no way to change this behavior on the Google account settings, and the only truly correct way to address it is to set up 2FA and use an app-password. It looks like you are using some independent German mail service provider based on your mail host.

Is that a slightly edited copy paste of your config in .env? The line for MAIL_USERNAME appears to have an ‘l’ at the very end, can you verify that your MAIL_USERNAME and MAIL_FROM_ADDRESS are exactly the same, as some mail providers will also block you if you are using different values for these two fields.

Also check storage/logs/laravel.log for any references to SMTP for more information.

Finally you can also try sending an invoice email from InvoiceNinja itself to mail-tester.com

Hi!

Ehm yes i am indeed using a different one than gmail. it’s called intention.
However i’ve also tried gmail as well.

i’ve also made a new inbox from my mail provider, with a easy password without weird characters. but all of them don’t work.

Yes i made sure that MAIL_USERNAME and MAIL_FROM_ADDRESS are exactly the same. also they indeed ends with an L.

laravel.log prints the whole email when i sent a invoice. the mail-tester.com gave me a 7.2 which was good.

thanks for the help though, but i think i just give up :confused: can’t make any progress in this.