Not able to send emails from the journal platform 3.4.0.1

I am trying to add editors to a new journal for the first time. I have noticed that no notifications are sent to the emails of the editor from the platform. Surprisingly I could send emails/notifications to any email account that belong to the same server of my domain - I mean I have created email accounts on my domain and these email accounts can receive emails from the platform, but any other email accounts outside my domain do not receive any email. I have tried to follow recommendations from similar threads. But nothing worked for me.
Here is what have in the confige.inc.php:

[email]

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

; 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 = mail.moleculepub.com
smtp_port = 465

; Enable SMTP authentication
; Supported smtp_auth: ssl, tls (see PHPMailer SMTPSecure)
smtp_auth = ssl
smtp_username = xxxxx@moleculepub.com
smtp_password = xxxxxx

; Enable suppressing SSL/TLS peer verification by SMTP transports
; Note: this is not recommended for security reasons
; smtp_suppress_cert_check = Off

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

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

; 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 = Off

; 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 = Off

; 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’

; 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

Thank you

Hi @mazenhammadi,

See this post:

Regards,
Alec Smecher
Public Knowledge Project Team

Hello. Thank you for your reply. I tried your suggestion but it is still not working. As I mentioned before I can send notification to the admin email (which is on the same server), but no email can be sent to any other email!

Hi @mazenhammadi,

That means your SMTP configuration is correct (i.e. OJS can contact the server with the credentials you’ve supplied), but your email server is refusing to deliver the messages. You may be able to find an email log entry on your server indicating why the message was not delivered. The likeliest cause is the DMARC configuration, which you’ve quoted above. I’d suggest reviewing other threads on this forum about DMARC.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi,
Still trying to figure out the cause of this problem. I checked out the email log entry and found the following error:
[28-Nov-2023 17:18:48 -0700]: DB Error: [1] no such table: calendars (SQL Query: SELECT *, “calendar_id” AS id FROM “calendars” WHERE “user_id” = ‘1’ ORDER BY “name”) in /usr/local/cpanel/base/3rdparty/roundcube/program/lib/Roundcube/rcube_db.php on line 564 (POST /cpsess7788107363/3rdparty/roundcube/index.php?_task=mail&_action=refresh)

This is the error that I am getting now:
[29-Nov-2023 02:05:10 -0700]: PHP Error: Request security check failed (POST /cpsess7788107363/3rdparty/roundcube/index.php?_task=mail&_action=refresh)

I have also noticed that changes in the config.inc.php file do not make any difference. I.e. even when I have all line deactivated (with ; ) I can still send emails to email addresses on my domain! But certainly no emails go to other email addresses

Hi @mazenhammadi,

When you have all the config lines disabled with a ;, OJS will try to use a local sendmail to deliver messages. That’s probably what’s happening. But it sounds like that’s not the configuration you want.

The log you posted above is from your Roundcube CPanel application, and isn’t related to OJS.

Regards,
Alec Smecher
Public Knowledge Project Team

Hello again. After several months I am still facing the same problem. I cannot send notification from the OJS system installed on our domain. We will soon launch our journals and therefore it is urgent to solve the problem. I´ve seeked advice from IT experts, with no success. I understand it could be a security problem with my email, but I need to know some information so that I can seek the right way to solve the problem. I added a DMARC record, but nothing has worked for me. I have also tried to used a gmail account and it worked!! But obviously I prefer to use an email of the same domain of the journals. Please advise.
Thank you. Mazen

Try setting your email like this

[email]

; 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 = mail.moleculepub.com
smtp_port = 587

; Enable SMTP authentication
; Supported smtp_auth: ssl, tls (see PHPMailer SMTPSecure)
smtp_auth = tls
smtp_username = xxxxx@moleculepub.com
smtp_password = xxxxxx

; Enable suppressing SSL/TLS peer verification by SMTP transports
; Note: this is not recommended for security reasons
; smtp_suppress_cert_check = Off

; 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 = xxxxx@moleculepub.com

; 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

; 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’

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

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

Replace with your real email and credential.

Thank you dear. Your suggestion does not work. I have been trying for a long time to paly with the configuration file but nothing has worked so far with the my domain email (however it did work with a gmail account). Most likely the problem is with my email account and it may be related to a security issue. I.e. my email server is not giving the permission to the OJS platform to send email. But I need to know if anyone has had a similar issue before and maybe provide me with some advice to solve this problem.

An alternative for me would be to use a gmail account. However, when I use a gamil account in the configuration, the envelope sender function does not work. I mean to use a gmail account as smtp username and an account of my domain as envelope sender. What happens is that the receiver of the emails can see that the email are send from a gmail account, and the envelope sender does not appear all.

Then ojs is working as intended.

The problem is with your hosting server.

Its better to get support from your hosting server. Only them can advice and make the changes needed.

Yes it is working. As I mentioned when I use a gmail account it works. But I would grateful if someone can give an idea about possible changes that I should make on my hosting server, i.e. where could the problem exactly be? I´ve asked several general IT experts about this but they have not been able to help. That´s why it be very useful to narrow the options that I should work on. Thank you