OCS - Pasword reset mail is not send

Hi everybody,

I’m using OCS 2.3.6.0

User complain, that they can not reset their passwords, because no email containing the reset-link will be send from the system. I tried by myself and facing the same problem.

All the other emails work (registration, submission,…)!

I tried the following attempts with no effect:

  • searching forum for solutions
  • reset email templates
  • set force_ssl = Off (I recently activated sll)
  • set smtp = Off

Does anyone has a hint for me?
Thanks a lot,
Daniel

Hi @danielbrohm

How is set your mail section in config.inc.php file? Are you using localhost or an external mail server to send messages?
Have you checked your mail log and php error log in your server?

Regards,
Israel Cefrin
Public Knowledge Project Team

Hi @israel.cefrin

thanks for your answer. This is my E-Mail configuration

;;;;;;;;;;;;;;;;;;
; Email Settings ;
;;;;;;;;;;;;;;;;;;

[email]

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

; SMTP server settings
; smtp_server = mailout.one.com
; smtp_port = 587

; Enable SMTP authentication
; Supported mechanisms: PLAIN, LOGIN, CRAM-MD5, and DIGEST-MD5
; smtp_auth = LOGIN
; smtp_username = tagung@dgg-online.org
; smtp_password = ###mypassword###

; Allow envelope sender to be specified
; (may not be possible with some server configurations)
; allow_envelope_sender = On

; Enable attachments in the various "Send Email" pages.
; (Disabling here will not disable attachments on features that
; require them, e.g. attachment-based reviews)
enable_attachments = On

; Amount of time required between attempts to send non-editorial emails
; in seconds. This can be used to help prevent email relaying via OCS.
time_between_emails = 10

; Maximum number of recipients that can be included in a single email
; (either as To:, Cc:, or Bcc: addresses) for a non-priveleged user
max_recipients = 10

; If enabled, email addresses must be validated before login is possible.
require_validation = Off

; Maximum number of days before an unvalidated account expires and is deleted
validation_timeout = 14

I wonder where I could find/get php and mail logs. It’s something on the server? We are hosted at one.com.

Thanks for having a look on the settings!
Daniel

Hi @danielbrohm

Checking your config.inc.php you may see a “;” in beginning of line. This means “comments” and it is being ignored in execution time.

If you want use a external SMTP as is set you need remove this signals from configuration lines and change smtp = On.

Regards,
Israel Cefrin
Public Knowledge Project Team

Dear @israel.cefrin,

thank you for your answer. I changed the settings last night (see at the button), but with no effect on the email communication.

I think the smtp/php mail settings were not the problem, because registration/submission… mails work perfectly.

Not working are password reset mails and mails that are written as a sender different from the system (e.g., reviewer to submitter)

I get the message:

There was an error sending this email. Please check your PHP error log for more information.

Stack Trace:
File: /customers/a/3/a/dgg-online.org/httpd.www/ocs/lib/pkp/classes/mail/PKPMailTemplate.inc.php line 238
Function: Mail->send()

File: /customers/a/3/a/dgg-online.org/httpd.www/ocs/classes/mail/MailTemplate.inc.php line 180
Function: PKPMailTemplate->send(True)

File: /customers/a/3/a/dgg-online.org/httpd.www/ocs/lib/pkp/pages/login/PKPLoginHandler.inc.php line 206
Function: MailTemplate->send()

File: /customers/a/3/a/dgg-online.org/httpd.www/ocs/lib/pkp/classes/core/PKPPageRouter.inc.php line 177
Function: PKPLoginHandler->requestResetPassword(Array(0), Object(Request))

File: /customers/a/3/a/dgg-online.org/httpd.www/ocs/lib/pkp/classes/core/Dispatcher.inc.php line 130
Function: PKPPageRouter->route(Object(Request))

File: /customers/a/3/a/dgg-online.org/httpd.www/ocs/lib/pkp/classes/core/PKPApplication.inc.php line 170
Function: Dispatcher->dispatch(Object(Request))

File: /customers/a/3/a/dgg-online.org/httpd.www/ocs/index.php line 65
Function: PKPApplication->execute()

Any clue where I can find the error log?

btw: I use to get tons of these errors when activating: deprecation_warnings = On

CAUGHT EXCEPTION: Non-static method Core::microtime() should not be called statically, assuming $this from incompatible context (/customers/a/3/a/dgg-online.org/httpd.www/ocs/lib/pkp/classes/core/PKPApplication.inc.php:90)
CAUGHT EXCEPTION: Non-static method Registry::set() should not be called statically, assuming $this from incompatible context (/customers/a/3/a/dgg-online.org/httpd.www/ocs/lib/pkp/classes/core/PKPApplication.inc.php:91)
CAUGHT EXCEPTION: Non-static method Registry::getRegistry() should not be called statically, assuming $this from incompatible context (/customers/a/3/a/dgg-online.org/httpd.www/ocs/lib/pkp/classes/core/Registry.inc.php:56)
CAUGHT EXCEPTION: Non-static method Registry::set() should not be called statically, assuming $this from incompatible context (/customers/a/3/a/dgg-online.org/httpd.www/ocs/lib/pkp/classes/core/PKPApplication.inc.php:94)
CAUGHT EXCEPTION: Non-static method Registry::getRegistry() should not be called statically, assuming $this from incompatible context (/customers/a/3/a/dgg-online.org/httpd.www/ocs/lib/pkp/classes/core/Registry.inc.php:56)
CAUGHT EXCEPTION: Non-static method Registry::set() should not be called statically, assuming $this from incompatible context (/customers/a/3/a/dgg-online.org/httpd.www/ocs/lib/pkp/classes/core/PKPApplication.inc.php:96)

Maybe it is an general problem in my installation.

I’m thankful for any hint!
Daniel

    ;;;;;;;;;;;;;;;;;;
    ; Email Settings ;
    ;;;;;;;;;;;;;;;;;;

[email]

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

; SMTP server settings
smtp_server = send.one.com
smtp_port = 25

; Enable SMTP authentication
; Supported mechanisms: PLAIN, LOGIN, CRAM-MD5, and DIGEST-MD5
smtp_auth = PLAIN
smtp_username = tagung@dgg-online.org
smtp_password = ########

; Allow envelope sender to be specified
; (may not be possible with some server configurations)
allow_envelope_sender = On

; Enable attachments in the various "Send Email" pages.
; (Disabling here will not disable attachments on features that
; require them, e.g. attachment-based reviews)
enable_attachments = On

; Amount of time required between attempts to send non-editorial emails
; in seconds. This can be used to help prevent email relaying via OCS.
time_between_emails = 10

; Maximum number of recipients that can be included in a single email
; (either as To:, Cc:, or Bcc: addresses) for a non-priveleged user
max_recipients = 10

; If enabled, email addresses must be validated before login is possible.
require_validation = Off

; Maximum number of days before an unvalidated account expires and is deleted
validation_timeout = 14

Hi @danielbrohm

Have you checked your PHP error log? Stack trace is just saying there was an error and you should verify it.

Distro like RHEL / Red Hat / CentOS / Fedora
/var/log/httpd/error.log

Distro like Debian / Ubuntu
/var/log/apache2/error.log

Distro like FreeBSD
/var/log/httpd-error.log

Regards,
Israel Cefrin
Public Knowledge Project Team