Gmail SMTP setup 2023

Iā€™m sorry if this has been asked too many times - Iā€™m new and trying to get SuiteCRM to work.

I am unable to configure Gmail with SMTP. With the correct SMTP port over TLS, I get this error:

An email error occurred:SMTP Error: Could not connect to SMTP host. Failed to connect to serverSMTP server error: Failed to connect to server SMTP code: 111 Additional SMTP info: Connection refused

Is there a way to make this work?

Alternatively, can I use PHP mail instead of SMTP so the mails go from the server itself? I donā€™t need to use email to communicate via SuiteCRM. I just need task, meeting and calendar reminders to be sent by the system to users.

Hiā€¦ Check your Gmail account security. I know that Gmail have some security when you want to connect with another aplication

Iā€™ve checked and turned off 2-Step Verification. I donā€™t see any other security settings thatI can reduce.

I get this error:

3: Connection: opening to smtp.gmail.com:587, timeout=300, options=array()
3: Connection failed. Error #2: stream_socket_client(): Unable to connect to smtp.gmail.com:587 (Connection refused) [/home/public_html/suitecrm/vendor/phpmailer/phpmailer/src/SMTP.php line 397]
1: SMTP ERROR: Failed to connect to server: Connection refused (111)
3: SMTP Error: Could not connect to SMTP host. Failed to connect to server

No difference if i change from TLS or SSL and port 587. I also tried to enable 2 step verification and setup App Password. Not sure why, but it doesnā€™t work.

Iā€™m wondering how most people use SuiteCRM without email functionality working, pls do suggest.

I too am getting the ā€œAn email error occurred:SMTP connect() failed.ā€ This previously worked for me. But my GoDaddy database became corrupted. I have used the Google Gmail one-time password generation. Nothing works. I have tried multiple combinations of other SMTP email relays. Nothing works.

Getting frustrated.

If i change ā€˜smtpā€™ to ā€˜Sendmailā€™ in suitecrm/public/legacy/modules/Emails/Email.php line 820, I can send a test mail out from the Email Settings page. While should mean email sending is working - but I still donā€™t get reminder notification emails or emails that are composed by users.

If i use a non-gmail server based SMTP, it works. I can test email sending, I can compose and send mails but reminder emails donā€™t work.

I canā€™t go live with my installation, despite having sent hours implementing and configuring it :unamused:

  1. Sign in to your Gmail account.
  2. Go to the Google Account Security page by visiting the following link: https://myaccount.google.com/security.
  3. Scroll down to the ā€œLess secure app accessā€ section and click on the ā€œTurn on access (not recommended)ā€ link. Please note that the wording may vary slightly, but the link should be available.
  4. On the next screen, toggle the switch to enable ā€œAllow less secure apps.ā€ You may need to verify your account with your password or other security measures.
  5. Once enabled, you should be able to use less secure apps with your Gmail account.

There is no option called ā€œLess secure app accessā€ anymore.