Email not working

Hello guys, I know there are many threads on this, email function is not working at all. where should I go to check on this? (i’m still learning all of this OJS things )
thank you for your assistance

Hi @jkings16,

sometimes, these problems are related to one of these points:

  • a problem with your server’s php configuration, because OJS uses PHP’s mail functionalities, if no SMTP server has been configured (search for “smtp =” in your config.inc.php to see whether it is switched On or Off)
  • if you use one, there could be a problem with your SMTP configuration, check config.inc.php to see if the mail account data is entered correctly
  • a surrounding firewall can prevent your server from sending out email into the internet, you could check this with your IT service

Taking a look at your servers error logs might be a good starting point to see where the error is coming from. This would allow you to ask more specific questions.

2 Likes

I had problems with sending email in OJS 3.1.1.4. In php-errors.log there was:
“Connection failed. Error #2: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:
or:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed [/var/www/htdocs/lib/pkp/lib/vendor/phpmailer/phpmailer/class.smtp.php line 378”

In /lib/pkp/clases/mail/Mail.inc.php add this:

$mailer->SMTPOptions = array(
‘ssl’ => array(
‘verify_peer’ => false,
‘verify_peer_name’ => false,
‘allow_self_signed’ => true
);

on line 464.

And in config.inc.php have this:

[email]

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

; SMTP server settings
smtp_server = 84.237.21.129
smtp_port = 25

; Enable SMTP authentication
; Supported mechanisms: ssl, tls PLAIN LOGIN
smtp_username =user@site.ru
smtp_password = ***


This make sending email working.

1 Like

hi @vasmed
I too had this problem however, i solved this by configuring config.inc.php

Please follow this post Email is not sent through OJS 3.0.2 - #11 by joapreditor