Problem with emails OJS [solved]

Hello, I updated my OJS from version 3.3.0.4 to 3.3.0.14, since that update I cannot send messages from the OJS platform and OJS automatic messages are not sent either, but I can send us correctly from my web server.
When looking at the error log php I get this error
[28-May-2023 14:02:50 America/Asuncion] PHP Warning: Undefined array key “message” in /usr/local/cpanel/base/3rdparty/roundcube/program/include/rcmail_action.php on line 239

How can I solve this problem?

Hi @juanivan92,

As a starting point, you can review some of our documentation on email configuration/troubleshooting here: https://docs.pkp.sfu.ca/admin-guide/3.3/en/email

-Roger
PKP Team

Hi @rcgillis
I think my query was not clear, since 2017 I have the ojs configured in the same way and I never had problems with sending emails, until now that I updated to version 3.3.0.14 (from 3.3.0.4). Is this not a problem with this new version?

I think Yes. I am facing same issue.

Hi @juanivan92,

Thank you for the additional context. In the future, if you could include those relevant details in your original post so those that may offer advice would have the appropriate information, that would be appreciated. I do not know directly if this is a problem with a new version, but I will see if our other team members can assist when they are available, or other community members may wish to weigh in.

-Roger
PKP Team

I was able to solve the problem by changing this data in the mail section of config.inc.php
Delete the “;” in
smtp=On
smtp_server
smtp_port
smtp_username
smtp_password

Change to smtp_port = 465
In smtp_server = ssl://mail.yourdomain

smtp_username = mail@yourdomain
smtp_password = password

The username must be the main contact email (with @yourdomain) with its corresponding password. Both without “”.

This solution did not work for me because the problem is a little different. I get SMTP connect () failed error.

Hello, I leave you the configuration that I made in both version 3.3.0-14 and 3.4.0-1 of sending emails, I hope it helps you solve the problem. It works for me in both versions

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

[email]
---- INFORMATION IN VERSION 3.4.0-1 ----
; Default method to send emails
; Available options; sendmail, smtp, log, phpmailer
; default = sendmail
default = smtp

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

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

; SMTP server settings
smtp_server = smtp.office365.com
smtp_port = 587

; Enable SMTP authentication
; Supported smtp_auth: ssl, tls (see PHPMailer SMTPSecure)
smtp_auth = starttls
smtp_username = username@dominio.xxx
smtp_password = password

---- INFORMATION IN VERSION 3.3.4.0-14 ----
; Supported smtp_authtype: RAM-MD5, LOGIN, PLAIN, XOAUTH2 (see PHPMailer AuthType)
; (Leave blank to try them in that order)
; Code for versions 3.3.0-14 and 3.4.0-1
smtp_authtype = Login

; The following are required for smtp_authtype = XOAUTH2 (e.g. GMail OAuth)
; (See Using Gmail with XOAUTH2 · PHPMailer/PHPMailer Wiki · GitHub)
; smtp_oauth_provider = Google
; smtp_oauth_email =
; smtp_oauth_clientid =
; smtp_oauth_clientsecret =
; smtp_oauth_refreshtoken =

; Enable suppressing verification of SMTP certificate in PHPMailer
; Note: this is not recommended per PHPMailer documentation
; smtp_suppress_cert_check = On

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

; Default envelope sender to use if none is specified elsewhere
; default_envelope_sender = my_address@my_host.com
default_envelope_sender = username@dominio.xxx

; Force the default envelope sender (if present)
; This is useful if setting up a site-wide no-reply address
; The reply-to field will be set with the reply-to or from address.
force_default_envelope_sender = On

enable_attachments = On

; Force a DMARC compliant from header (RFC5322.From)
; If any of your users have email addresses in domains not under your control
; you may need to set this to be compliant with DMARC policies published by
; those 3rd party domains.
; Setting this will move the users address into the reply-to field and the
; from field wil be rewritten with the default_envelope_sender.
; To use this you must set force_default_enveloper_sender = On and
; default_envelope_sender must be set to a valid address in a domain you own.
force_dmarc_compliant_from = On

; The display name to use with a DMARC compliant from header
; By default the DMARC compliant from will have an empty name but this can
; be changed by adding a text here.
; You can use ‘%n’ to insert the users name from the original from header
; and ‘%s’ to insert the localized sitename.
; dmarc_compliant_from_displayname = ‘%n via %s’

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

; Maximum number of recipients that can be included in a single email
; (either as To:, Cc:, or Bcc: addresses) for a non-privileged 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

1 Like

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