Error Email help me with email error

Describe the issue or problem
Hello,
Recently my site showed issues with the email, I verified the OJS Configurations and all it´s okay.

I use Gmail with these configurations:
[email]

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

; SMTP server settings
smtp_server = “ssl://smtp.gmail.com”
smtp_port = 465

; Enable SMTP authentication
; Supported smtp_auth: ssl, tls (see PHPMailer SMTPSecure)
smtp_auth = PLAIN
smtp_username = “email”
smtp_password = “password”

And the Apache error are:

telnet smtp.gmail.com 465
Trying 142.251.2.109…
Connected to smtp.gmail.com.
Escape character is ‘^]’.
Connection closed by foreign host.

[Wed Apr 23 11:53:51.543636 2025] [php7:notice] [pid 64566] [client 189.217.97.245:64521] SMTP connect() failed. Troubleshooting · PHPMailer/PHPMailer Wiki · GitHub, referer: https://site.com/ojs/index.php/index/login/lostPassword

Please, anyone that could help me with this error.

What application are you using?
For example, OJS 3.3.0-4

Additional information
Please add any screenshots, logs or other information we can use to investigate this problem.

Thank you.

Hi @dios98,

See this document for information on configuring SMTP with gmail. You may have to make additional configuration via Google to get this to work; see the link on that document.

Regards,
Alec Smecher
Public Knowledge Project Team

I changed the configuration and the issue persist.

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

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

; Enable SMTP authentication
smtp_auth = ssl
smtp_username = "user@gmail.com"
smtp_password = "password"

I restarted the apache services and I tried again and this si the log.

[Wed Apr 23 12:35:40.981129 2025] [php7:notice] [pid 2437] [client 189.217.97.245:64736] SMTP connect() failed. Troubleshooting · PHPMailer/PHPMailer Wiki · GitHub, referer: https://site.com/ojs/index.php/index/login/lostPassword

Regards and thank you,

The issue was with gmail, I created an app password and in the confi file of OJS I changed it, and now Works well.

See ya

1 Like