503-Please turn on SMTP Authentication in your mail client

Hi,

I can’t get over the following problem.

Scenario
-I own my own virtualization server, which runs a cPanel server (IPv4 and IPv6) on a VM and a container for Invoice Ninja IPv4.
-Running Invoice Ninja v5.3.66-c77
-cPanel is up to date with the latest LTS release.
-SMTP setup to send emails using my own server.
-SMTP server works with every other email client (gmailify, webmail horde, Outlook 365 and others)
-Alerts setup to warn me on invoice activities on bill***@********.com.au (Running on my own server).

Symptoms
On sending of every invoice:
-I get the email notification/alert “Unable to deliver Invoice *******”.
-Followed by an email notification/alert the invoice was sent, contradicting the previous email.
-In the invoice activity, I see the a few lines of error.


-On tests sending a test invoice to a Gmail address I own, it goes to the spam box and says Gmail can’t confirm the email was send from my domain. (Sending email from elsewhere is fine, this only happens to the emails sent from Invoice Ninja).
I don’t know what else to do.

What is the agent Invoice Ninja is using the send email when configured to send via SMTP? Or have you seen this error before and already have the solution?

Thank you.

Hi,

Maybe the email’s DKIM or SPF isn’t correct?

https://mellowhost.com/blog/smtp-error-550-please-turn-on-smtp-authentication-in-your-mail-client-ip-is-not-permitted-to-relay-through-this-server-without-authentication.html

Yes, I have SPF, DKIM and DMARC all setup and passing.

But please notice the error message says:
“Please turn on SMTP Authentication in your mail client

When I use the same SMTP credentials to send emails via Outlook, it is received normally. Therefore I am pretty much ruling out anything to do with the server or it settings.

How does Invoice Ninja connects to the SMTP server? I believe it is related to this.

Thank you.

@david can you please advise?

Hi,

The issue still exists but I have found a workaround it.

I basically had to setup postfix in the IN5 server and ask invoice ninja to use sendmail instead of SMTP.

Then I did setup the From email and name in the php.ini. It is working as intended, but ideally I would prefer to use the SMTP option.

What part of the code do you create the SMTP connection? I am more than happy to take a look and see what I can find.

Thank you.

Thanks for sharing the solution!

@david can you please advise on the code?

@Danilo

We hand off all SMTP connection logic to Laravel, so this would be something deeper within the framework itself.