SMTP e-mail error

@asmecher
Dear Sir,
OJS version 3.2.1.1. shows mailing error. “There was a problem sending an email message. Please try again later, or contact your system administrator”. Please help me to fix the error. I have assigned editor. But same issue has came. I have checked with error_log file and it showed “Could not instantiate mail function”
Screenshot from 2021-03-02 17-14-49

Thanks with regards
Dr. Selvakumar

1 Like

@drugurkocak, thank you!
One part of the problem is solved ) - I used wrong email adress in Settints/Contact/Principal Contact/email.
After this correction the author started to become the notification about sending of the article.
But the alert messages still appears. There was 3 red errorboxes, now - 2 )).

Errol log contains 2 lines of the:
“The following From address failed: author_mail@mail.com : MAIL FROM command failed,Sender address rejected: not owned by auth user”, but 2 receivers (author and admin) becomes the notification.

Hi @Spaik
Can you check whether SMTP = ON or OFF in your config.inc.php and the semi-colon at the startup of the line has been removed or not.
This error suggests that you have enabled smtp and configured a username and password, but trying to send emails from another email address (that is recorded somewhere in OJS journal settings.
And what about the sebsequent lines such as;
allow_envelope_sender = …
default_envelope_sender =
force_dmarc_compliant_from =
These lines determine which email address will always be used in FROM field if enabled.
Regards,

@drugurkocak,
Now I have configured config.inc.php instead phpMailer.php.
The same situation.

SMTP=on
; allow_envelope_sender = …
; default_envelope_sender =
; force_dmarc_compliant_from =

When allow_envelope_sender = on and default_envelope_sender = admin@mail.com emails are not generated.

Hi, @drugurkocak !
As you noticed, the problem was with these three settings.
Now everything is Ok.
Many thanks for the help!

1 Like

Dear @asmecher
Still now the problem is not resolved. Pls help me. I am running two journals, both are having same problem.

I am waiting for your help.

Hi @JINAGRI_JOURNAL,

Are you using SMTP to deliver messages from OJS? (This is configured in config.inc.php.) If so, what SMTP service are you using?

Regards,
Alec Smecher
Public Knowledge Project Team

Dear Sir,
Previously I haven’t used any SMTP. But the mail was sent through admin mail. Suddenly it stopped sending mail.

After that, I have set SMTP as per the forum discussion but nothing is working.

[email]

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

; SMTP server settings
smtp_server = smtp.gmail.com
smtp_port = 465

; Enable SMTP authentication
; Supported mechanisms: ssl, tls
smtp_auth = SSL
smtp_username = editorjinagri@gmail.com
smtp_password = password of my mail

; 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

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

; 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

Hi @JINAGRI_JOURNAL,

GMail apparently stopped allowing simple password-based SMTP email delivery on February 15, 2021. I would recommend using a different SMTP server. There is experimental OAuth support for GMail-based email delivery, if you are able to work with the code; see OAuth for Gmail Access · Issue #5365 · pkp/pkp-lib · GitHub for details.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi

[OJS 3.2.1.1] I have the same problem, the configuration in config.inc.php is correct because if I write another gmail it works.

https://docs.pkp.sfu.ca/admin-guide/en/email
“Troubleshooting Email Problems” this describes my problem. What I have to do?

Regards,
Elena Cruz

revistaalergia.mx_ojs_index.php_ram_management_settings_access (1)

1 Like

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