[SOLVED] Help dont work SMTP Gmail

Hello everyone, although there are many topics created about problems with the SMTP of Gmail, I see that few came to solve the problem or few commented.

What happens to me is that I have a G suite account,

configure in config.inc.php


; Use SMTP for sending mail instead of mail ()
smtp = On

; SMTP server settings
smtp_server = smtp.gmail.com
smtp_port = 465

; Enable SMTP authentication
; Supported mechanisms: ssl, tls
smtp_auth = ssl
smtp_username = mydirection@domain.com
smtp_password = password

The strange thing about this case is that it worked well one day, but then the messages did not come back.

I clarify that I try all the gmail ports, different smtp URLs but nothing…

Thank you for reading

UPDATE: I contacted the Google support after a series of configurations came back to work.

Try ssl://smtp.gmail.com

Hi, @Vitaliy, thanks for replying, I already tried the SSL address, but it did not work.

Also try ports 25, 465 or 587 ports and nothing …

The strange thing is that the first day that G Suite hired worked without problems, but then it stopped working …

I also communicate with Gmail support, I’m waiting for answers.

I have something else to try in OJS?

Don’t know. Everything worked for me fine when I tried to adopt similar SMTP settings for my own mail server. Eventually switched to PHP mail() function, because of strange rejection of our emails to the spam folder in Google and Yahoo mails.

Think, this is Gmail’s server issue.

@Vitaliy Thanks for your answer.

Now if I leave the default configuration it works correctly.

But I’m not sure that the emails arrive correctly

Do I have to configure another rule in case I continue using the default configuration? (php mail ())

I would recommend setting up a test user with a gmail address on the system and generating some messages to that user. This will help you confirm that messages are being sent as expected and not being flagged as spam.

If successful, the PHP mail() function is sufficient and there is nothing additional to configure.

See this thread for more detailed information about OJS emailing and spamtrapping by Gmail and Yahoo:

The specific OJS version numbers mentioned are not as important as understanding the relationship of SPF, DMARC, and DKIM at the server level.

Hi @Jorgef May I know ho to solve regarding this email problem? An how the solution from google support ?