OJS does not send email after upgrade to 3.4

Describe the issue or problem
After updating OJS from 3.3.0-17 to 3.4.0-6 I can no longer send emails. With the same configuration I have never had problems with ojs 3.3.x
Any suggest? Thank you
Steps I took leading up to the issue
For example:

  1. Go to Users&role
  2. Choose an user
  3. Click on “email”
  4. Send a test email to an user
  5. In apache log I see this error: "Got error ‘PHP message: Connection to “*****smtp.com:25025” timed out.’,

What application are you using?
OJS 3.4.0-6
PHP 8.1
Ubuntu 22.04

Additional information
config.inc.php mail configuration:

; Default method to send emails
; Available options: sendmail, smtp, log, phpmailer
default = smtp

; Path to the sendmail, -bs argument is for using SMTP protocol
sendmail_path = “/usr/sbin/sendmail -bs”

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

; SMTP server settings
smtp_server = *****smtp.com
smtp_port = 25025

; Enable SMTP authentication
; Supported smtp_auth: ssl, tls (see PHPMailer SMTPSecure)
smtp_auth = ssl
smtp_username = “"
smtp_password = "

Hi @Nick_Straw,

As a starting point, you may want to review our documentation here:
https://docs.pkp.sfu.ca/admin-guide/en/deploy-email

-Roger
PKP Team

Thanks @rcgillis for the advice. In the meantime I did some troubleshooting and I read in the documentation that the email management library changed between 3.3 (phpmailer?) and 3.4 (laravel?). I used the exact same configuration which works correctly with 3.3 but not on 3.4.
I tried with telnet and the connection to the SMTP server on port 25025 is successful. Since everything worked correctly with 3.3 I think there is something in the library, but I don’t know if there are more detailed logs than the Apache ones, perhaps a debug variable to set, to have more detailed smtp log.
Thank you

hi @Nick_Straw,

Yes - I believe it has changed, but I’m not familiar enough with it to be able to advise on this. @asmecher - are you able to speak to this?

-Roger
PKP Team

Hi @Nick_Straw,

Starting with OJS 3.4.0, we use Laravel’s Mailables toolkit, which in turn relies on Synfony’s mailer for SMTP delivery. You could look into lib/pkp/lib/vendor/symfony/mailer/Transport/Smtp/SmtpTransport.php in the start function, where I think at a glance the connection to the server is established. Going one step deeper into the code, lib/pkp/lib/vendor/symfony/mailer/Transport/Smtp/Stream/SocketStream.php should be where the socket is implemented.

Regards,
Alec Smecher
Public Knowledge Project Team

Unfortunately I wasn’t able to go any further in resolving the problem, so I solved it by changing the smtp service. Using google workspace’s smtp-relay service everything works perfectly. Thank you

1 Like

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