Comments plug-in does not use general email (smtp) settings

Having Omeka installation at shared hosting service which means command line commands are not available. This is not problem when creating e.g. new users, as then notification emails are sent via SMTP. But with Comments plug-in that does not work and error messages are generated after submitting a comment which should initiate notification email. If not using notification emails (=no receivers set at Comments settings), no errors.

So, how come Comments is using sendmail instead of smtp? And where and how we can fix it?

Which plugin specifically are you using?

The “Commenting” plugin from the Omeka Team should be using the same mail sending code as anything else in the system. If you’re using another plugin that could be a different story.

It is Omeka’s own plugin.

Error message comes only if having email addresses for notifications (and then trying to send notifications after logging comments). If no email addresses listed (for notifications), no error messages when commenting. Below is log information.

2022-09-07T21:54:38+03:00 ERR (3): RuntimeException: PHP-polku (/usr/local/php74/bin/php) ei osoita PHP-CLI -ohjelmaan. in /home/kinxuvyqpa/domains/punkmuseo.fi/public_html/arkisto/application/libraries/Omeka/Job/Process/Dispatcher.php:124

Stack trace:

#0 /home/kinxuvyqpa/domains/punkmuseo.fi/public_html/arkisto/application/libraries/Omeka/Job/Process/Dispatcher.php(93): Omeka_Job_Process_Dispatcher::_checkCliPath()

#1 /home/kinxuvyqpa/domains/punkmuseo.fi/public_html/arkisto/application/libraries/Omeka/Job/Process/Dispatcher.php(28): Omeka_Job_Process_Dispatcher::getPHPCliPath()

#2 /home/kinxuvyqpa/domains/punkmuseo.fi/public_html/arkisto/application/libraries/Omeka/Job/Dispatcher/Adapter/BackgroundProcess.php(31): Omeka_Job_Process_Dispatcher::startProcess()

#3 /home/kinxuvyqpa/domains/punkmuseo.fi/public_html/arkisto/application/libraries/Omeka/Job/Dispatcher/Default.php(151): Omeka_Job_Dispatcher_Adapter_BackgroundProcess->send()

#4 /home/kinxuvyqpa/domains/punkmuseo.fi/public_html/arkisto/plugins/Commenting/controllers/CommentController.php(233): Omeka_Job_Dispatcher_Default->sendLongRunning()

#5 /home/kinxuvyqpa/domains/punkmuseo.fi/public_html/arkisto/plugins/Commenting/controllers/CommentController.php(83): Commenting_CommentController->sendEmailNotifications()

#6 /home/kinxuvyqpa/domains/punkmuseo.fi/public_html/arkisto/application/libraries/Zend/Controller/Action.php(516): Commenting_CommentController->addAction()

#7 /home/kinxuvyqpa/domains/punkmuseo.fi/public_html/arkisto/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch()

#8 /home/kinxuvyqpa/domains/punkmuseo.fi/public_html/arkisto/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch()

#9 /home/kinxuvyqpa/domains/punkmuseo.fi/public_html/arkisto/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(105): Zend_Controller_Front->dispatch()

#10 /home/kinxuvyqpa/domains/punkmuseo.fi/public_html/arkisto/application/libraries/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run()

#11 /home/kinxuvyqpa/domains/punkmuseo.fi/public_html/arkisto/application/libraries/Omeka/Application.php(73): Zend_Application->run()

#12 /home/kinxuvyqpa/domains/punkmuseo.fi/public_html/arkisto/index.php(23): Omeka_Application->run()

The problem here is about your server’s configuration for running background jobs: the difference isn’t that Commenting sends email with different settings, but that it uses a background job to do so.

You need to check that you have the right path to PHP configured: the message is saying that your current configured path isn’t pointing to the PHP CLI (I believe that’s what the translation there says).

Yep, we know that, as it is running on shared hosting and command line commands etc. cannot be used for security purposes.

But why sending notifications as background jobs? E.g. sending notifications when adding new users are not sent as background jobs… we need to take a look at how to change that, to make it work.

If you can’t use those commands on your host, you can set Omeka to run all background jobs as “foreground” jobs instead.

In your application/config/config.ini file there should be a line like this:

jobs.dispatcher.longRunning = "Omeka_Job_Dispatcher_Adapter_BackgroundProcess"

and you can change it to

jobs.dispatcher.longRunning = "Omeka_Job_Dispatcher_Adapter_Synchronous"

Thanks, that did the trick!

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