E mail service is not working

we are using OJS 3.1.1.4. we are facing the issue that e mails are not sent via OJS, neither the workflow e mails nor the new user account registration e mails, the e mail setting are as below:

[email]

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

; SMTP server settings
smtp_server = mail.jmedsci.com
smtp_port = 465

; Enable SMTP authentication
; Supported mechanisms: ssl, tls
smtp_auth = ssl
smtp_username = contact@jmedsci.com
smtp_password = ******

; 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 = contact@jmedsci.com

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

; 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-priveleged user
max_recipients = 10

; 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

Kindly help me in fixing this issue

Do you see any error messages in the PHP error logs at the time of email sending?

Note that without the force_default_envelope_sender setting being “On”, mail will be sent from the email addresses as entered by your users. This will only comply with SPF and DMARC rules if your users have entered addresses which designate mail.jmedsci.com as an allowed sender. In other words, if your user specifies an address of something@gmail.com, this will almost certainly be flagged as spam when mail.jmedsci.com tries to send a message as something@gmail.com.

1 Like

Thank you very much ctgraham and my apologies for replying so late as our institute was closed due to COVID.
Now i have turned ''on" the force_default_envelope_sender sttings, the whole e mail settings are as below:

Use SMTP for sending mail instead of mail()
smtp = on

; SMTP server settings
smtp_server = mail.jmedsci.com
smtp_port = 465

; Enable SMTP authentication
; Supported mechanisms: ssl, tls
smtp_auth = ssl
smtp_username = contact@jmedsci.com
smtp_password = ******

; 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 = contact@jmedsci.com

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

; 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-priveleged user
max_recipients = 10

; 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

Still not working.
These are the error: Kindly help us in fixing this issue

PHP Deprecated: Non-static method PKPRequest::_checkThis() should not be called statically in /home/jmedscic/public_html/lib/pkp/classes/core/PKPRequest.inc.php on line 425
[21-Jan-2021 05:08:33 UTC] SMTP connect() failed. Troubleshooting · PHPMailer/PHPMailer Wiki · GitHub
[21-Jan-2021 05:08:34 UTC] PHP Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/jmedscic/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 1003
[21-Jan-2021 05:08:34 UTC] PHP Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/jmedscic/public_html/lib/pkp/classes/core/PKPRequest.inc.php on line 685
[21-Jan-2021 05:08:34 UTC] PHP Warning: Declaration of PKPUsageEventPlugin::getEnabled() should be compatible with LazyLoadPlugin::getEnabled($contextId = NULL) in /home/jmedscic/public_html/lib/pkp/plugins/generic/usageEvent/PKPUsageEventPlugin.inc.php on line 76
[21-Jan-2021 05:08:34 UTC] PHP Warning: Declaration of CustomBlockPlugin::getBlockContext() should be compatible with BlockPlugin::getBlockContext($contextId = NULL) in /home/jmedscic/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 122
[21-Jan-2021 05:08:34 UTC] PHP Warning: Declaration of CustomBlockPlugin::getEnabled() should be compatible with BlockPlugin::getEnabled($contextId = NULL) in /home/jmedscic/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 78
[21-Jan-2021 05:08:34 UTC] PHP Warning: Declaration of DRIVERDAO::setOAI(&$oai) should be compatible with PKPOAIDAO::setOAI($oai) in /home/jmedscic/public_html/plugins/generic/driver/DRIVERDAO.inc.php on line 25
[21-Jan-2021 05:08:34 UTC] PHP Warning: Declaration of OpenAIREDAO::setOAI(&$oai) should be compatible with PKPOAIDAO::setOAI($oai) in /home/jmedscic/public_html/plugins/generic/openAIRE/OpenAIREDAO.inc.php on line 25
[21-Jan-2021 05:08:34 UTC] PHP Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/jmedscic/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 1003
[21-Jan-2021 05:08:34 UTC] PHP Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/jmedscic/public_html/lib/pkp/classes/core/PKPRequest.inc.php on line 685
[21-Jan-2021 05:08:34 UTC] PHP Warning: Declaration of PKPUsageEventPlugin::getEnabled() should be compatible with LazyLoadPlugin::getEnabled($contextId = NULL) in /home/jmedscic/public_html/lib/pkp/plugins/generic/usageEvent/PKPUsageEventPlugin.inc.php on line 76
[21-Jan-2021 05:08:34 UTC] PHP Warning: Declaration of CustomBlockPlugin::getBlockContext() should be compatible with BlockPlugin::getBlockContext($contextId = NULL) in /home/jmedscic/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 122
[21-Jan-2021 05:08:34 UTC] PHP Warning: Declaration of CustomBlockPlugin::getEnabled() should be compatible with BlockPlugin::getEnabled($contextId = NULL) in /home/jmedscic/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 78
[21-Jan-2021 05:08:34 UTC] PHP Warning: Declaration of DRIVERDAO::setOAI(&$oai) should be compatible with PKPOAIDAO::setOAI($oai) in /home/jmedscic/public_html/plugins/generic/driver/DRIVERDAO.inc.php on line 25
[21-Jan-2021 05:08:34 UTC] PHP Warning: Declaration of OpenAIREDAO::setOAI(&$oai) should be compatible with PKPOAIDAO::setOAI($oai) in /home/jmedscic/public_html/plugins/generic/openAIRE/OpenAIREDAO.inc.php on line 25
[21-Jan-2021 05:08:38 UTC] PHP Warning: Declaration of PKPUsageEventPlugin::getEnabled() should be compatible with LazyLoadPlugin::getEnabled($contextId = NULL) in /home/jmedscic/public_html/lib/pkp/plugins/generic/usageEvent/PKPUsageEventPlugin.inc.php on line 76
[21-Jan-2021 05:08:38 UTC] PHP Warning: Declaration of CustomBlockPlugin::getBlockContext() should be compatible with BlockPlugin::getBlockContext($contextId = NULL) in /home/jmedscic/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 122
[21-Jan-2021 05:08:38 UTC] PHP Warning: Declaration of CustomBlockPlugin::getEnabled() should be compatible with BlockPlugin::getEnabled($contextId = NULL) in /home/jmedscic/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 78
[21-Jan-2021 05:08:38 UTC] PHP Warning: Declaration of DRIVERDAO::setOAI(&$oai) should be compatible with PKPOAIDAO::setOAI($oai) in /home/jmedscic/public_html/plugins/generic/driver/DRIVERDAO.inc.php on line 25
[21-Jan-2021 05:08:38 UTC] PHP Warning: Declaration of OpenAIREDAO::setOAI(&$oai) should be compatible with PKPOAIDAO::setOAI($oai) in /home/jmedscic/public_html/plugins/generic/openAIRE/OpenAIREDAO.inc.php on line 25
[21-Jan-2021 05:08:38 UTC] PHP Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/jmedscic/public_html/lib/pkp/classes/core/Core.inc.php on line 489
[21-Jan-2021 05:08:38 UTC] PHP Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/jmedscic/public_html/lib/pkp/classes/core/Core.inc.php on line 489
[21-Jan-2021 05:08:41 UTC] PHP Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/jmedscic/public_html/lib/pkp/classes/core/Core.inc.php on line 489
[21-Jan-2021 05:08:41 UTC] PHP Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/jmedscic/public_html/lib/pkp/classes/core/Core.inc.php on line 489
[21-Jan-2021 05:08:44 UTC] PHP Warning: Declaration of ArticleHandler::initialize($request, $args) should be compatible with PKPHandler::initialize($request) in /home/jmedscic/public_html/pages/article/ArticleHandler.inc.php on line 49
[21-Jan-2021 05:08:44 UTC] PHP Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/jmedscic/public_html/lib/pkp/classes/core/Core.inc.php on line 489
[21-Jan-2021 05:08:44 UTC] PHP Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/jmedscic/public_html/lib/pkp/classes/core/Core.inc.php on line 489
[21-Jan-2021 05:08:55 UTC] ojs2: DB Error: Commands out of sync; you can’t run this command now

Your server is not able to connect to the SMTP server.

You can get more details in the log by enabling the “show_stacktrace” option in config.inc.php.

Please review the new log messages before posting; I’m not sure if the SMTP debug output will include authentication information.

1 Like

Thank you for your support,
Now i integrate local host instead of SMTP and now its working fine.
Thank you so much for your support