Error setting up Gmail SMTP

Hi,

I have the same problem since a few days ago.

I have activated “less secured apps” and setup the SMTP settings as follows:
Port: 587
Host name: smtp.gmail.com
Use secure connection (STARTTLS): YES

Here is the message I have:
It looks like there was a problem reaching your SMTP service
Error Message The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Authentication Required. Learn more at
More Details –

What do I do wrong?

Thanks for your help

Hi @cedev

Do you use 2-factor authentication for Gmail?

Hi @QFMathew,

No I don’t.

Hi @cedev

This is taken from an account I have access to, which has a working Google SMTP connection:
image

Hopefully, if you use the same settings and just add in your name and username, then this should work all OK for you.

No, it is still blocked. I just tried with success with this command:

curl --url 'smtps://smtp.gmail.com:465' --ssl-reqd --mail-from 'from@gmail.com' --mail-rcpt 'to@gmail.com' --upload-file mail.txt --user 'from@gmail.com:password'

And mail.txt contains:
TEST TEST

If I test with port 465, I now get:

It looks like there was a problem reaching your SMTP service
Error Message Failure sending mail.
More Details Unable to read data from the transport connection: net_io_connectionclosed.

Did you try it with port 25 like the screenshot above?

Yes but without luck.

Try port 587.

There are two ways to do a secure connection with SMTP. Port 465 is the older approach where there’s a dedicated port number that expects the client to initiate the secure negotiation immediately on connection. The more modern approach is where the client connects on the normal “insecure” port 25 (used mainly for server-to-server transfers of mail) or 587 (referred to as the “submission” port and intended for initial senders to submit mail into the system) and then requests the server to upgrade to a secure connection via the STARTTLS command.

The SMTP library used in QuickFile only supports the modern STARTTLS method, not the legacy port 465.

Thank you Ian for this information.

I just tried with port 587 and the STARTTLS method but I receive the same message:

It looks like there was a problem reaching your SMTP service
Error Message The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Authentication Required. Learn more at
More Details –

In google, I did receive notifications that something “odd” happened and I validated all the requests. I turned on less secure apps. I also tried with three other gmail accounts without luck.

If none of the ports are working, including the ones from my screenshot above (which does work on another account), I would suspect something else is wrong - such as a username or password, or there’s a restriction on your account (e.g. if you’re using G Suite and your administrator has restricted something).

If you are on G Suite, it may be worth raising this initially with your administrator, and if no joy there, perhaps querying it with Google or through a Google forum.

This topic was automatically closed after 7 days. New replies are no longer allowed.