Sending emails from system

Now a days we could not send email from system a
message is displayed “There was an error sending this email. Please check
your mail log (/var/log/maillog).”

Hi @journal123,

Have you checked your mail log?

Regards,
Alec Smecher
Public Knowledge Project Team

I don’t know how to check it. But I contacted the service provider, but they said it is major problem, and will take time. Please explain how to check the log.

Hi @journal123,

The details of checking your error log will depend on your service provider’s server setup, so unfortunately we can’t provide specific directions. Your best bet is to get guidance from them.

Regards,
Alec Smecher
Public Knowledge Project Team

Hello,
How do i send a message from system to someone who isn’t user yet?

Hi @sabrina,

Could you post this as a new question? It’s not the same question as the one you’re replying to here.

Regards,
Alec Smecher
Public Knowledge Project Team

Of course @asmecher.
I’m still learning how to use the forum.

Sorry and thanks!

Hi Alec,

I’m having the same problem.
My server provider says that the errors are probabily related to the new php version (I switched my installation to newer server recently, in the same host).

Some error messages displayed by the OJS:
There was an error sending this email. Please check your mail log
There was an error sending this email. Please check your mail log (/var/log/maillog).
Stack Trace:
File: /vhosts/periodicos.proped.pro.br/www/lib/pkp/classes/mail/PKPMailTemplate.inc.php line 236
Function: Mail->send()
File: /vhosts/periodicos.proped.pro.br/www/classes/mail/MailTemplate.inc.php line 162
Function: PKPMailTemplate->send(False)

And more…

My support service provider say (I did not understand, but…):

  • I had a “caged” (or packaged?) sendmail on the old server;
  • Now, I have one binary server doing relay “out of the cage” (??);

My support also set manually the “from” when calling the sendmail of “my php” and reported several errors related to php version (according to them):

[Wed Jun 24 17:35:08 2015] [error] [client 178.238.222.63] ojs2 has produced an error
[Wed Jun 24 17:35:08 2015] [error] [client 178.238.222.63] Message: USER NOTICE: Deprecated function.
[Wed Jun 24 17:35:08 2015] [error] [client 178.238.222.63] In file: /vhosts/periodicos.proped.pro.br/www/lib/pkp/classes/comment/Comment.inc.php
[Wed Jun 24 17:35:08 2015] [error] [client 178.238.222.63] At line: 34
[Wed Jun 24 17:35:08 2015] [error] [client 178.238.222.63] Stacktrace:
[Wed Jun 24 17:35:08 2015] [error] [client 178.238.222.63] Server info:
[Wed Jun 24 17:35:08 2015] [error] [client 178.238.222.63] OS: Linux
[Wed Jun 24 17:35:08 2015] [error] [client 178.238.222.63] PHP Version: 5.5.22
[Wed Jun 24 17:35:08 2015] [error] [client 178.238.222.63] Apache Version: N/A
[Wed Jun 24 17:35:08 2015] [error] [client 178.238.222.63] DB Driver: mysql
[Wed Jun 24 17:35:08 2015] [error] [client 178.238.222.63] DB server version: 5.5.43-MariaDB-log
[Wed Jun 24 17:35:08 2015] [error] [client 178.238.222.63] ojs2 has produced an error
[Wed Jun 24 17:35:08 2015] [error] [client 178.238.222.63] Message: USER NOTICE: Deprecated function.
[Wed Jun 24 17:35:08 2015] [error] [client 178.238.222.63] In file: /vhosts/periodicos.proped.pro.br/www/lib/pkp/classes/comment/Comment.inc.php
[Wed Jun 24 17:35:08 2015] [error] [client 178.238.222.63] At line: 34
[Wed Jun 24 17:35:08 2015] [error] [client 178.238.222.63] Stacktrace:
[Wed Jun 24 17:35:08 2015] [error] [client 178.238.222.63] Server info:
[Wed Jun 24 17:35:08 2015] [error] [client 178.238.222.63] OS: Linux
[Wed Jun 24 17:35:08 2015] [error] [client 178.238.222.63] PHP Version: 5.5.22
[Wed Jun 24 17:35:08 2015] [error] [client 178.238.222.63] Apache Version: N/A
[Wed Jun 24 17:35:08 2015] [error] [client 178.238.222.63] DB Driver: mysql
[Wed Jun 24 17:35:08 2015] [error] [client 178.238.222.63] DB server version: 5.5.43-MariaDB-log
[Wed Jun 24 17:35:08 2015] [error] [client 178.238.222.63] ojs2 has produced an error
[Wed Jun 24 17:35:08 2015] [error] [client 178.238.222.63] Message: USER NOTICE: Deprecated function.
[Wed Jun 24 17:35:08 2015] [error] [client 178.238.222.63] In file: /vhosts/periodicos.proped.pro.br/www/lib/pkp/classes/comment/Comment.inc.php
[Wed Jun 24 17:35:08 2015] [error] [client 178.238.222.63] At line: 34
[Wed Jun 24 17:35:08 2015] [error] [client 178.238.222.63] Stacktrace:
[Wed Jun 24 17:35:08 2015] [error] [client 178.238.222.63] Server info:
[Wed Jun 24 17:35:08 2015] [error] [client 178.238.222.63] OS: Linux
[Wed Jun 24 17:35:08 2015] [error] [client 178.238.222.63] PHP Version: 5.5.22
[Wed Jun 24 17:35:08 2015] [error] [client 178.238.222.63] Apache Version: N/A
[Wed Jun 24 17:35:08 2015] [error] [client 178.238.222.63] DB Driver: mysql
[Wed Jun 24 17:35:08 2015] [error] [client 178.238.222.63] DB server version: 5.5.43-MariaDB-log
[Wed Jun 24 17:35:09 2015] [error] [client 178.238.222.63] ojs2 has produced an error
[Wed Jun 24 17:35:09 2015] [error] [client 178.238.222.63] Message: USER NOTICE: Deprecated function.
[Wed Jun 24 17:35:09 2015] [error] [client 178.238.222.63] In file: /vhosts/periodicos.proped.pro.br/www/lib/pkp/classes/comment/Comment.inc.php
[Wed Jun 24 17:35:09 2015] [error] [client 178.238.222.63] At line: 34
[Wed Jun 24 17:35:09 2015] [error] [client 178.238.222.63] Stacktrace:
[Wed Jun 24 17:35:09 2015] [error] [client 178.238.222.63] Server info:
[Wed Jun 24 17:35:09 2015] [error] [client 178.238.222.63] OS: Linux
[Wed Jun 24 17:35:09 2015] [error] [client 178.238.222.63] PHP Version: 5.5.22
[Wed Jun 24 17:35:09 2015] [error] [client 178.238.222.63] Apache Version: N/A
[Wed Jun 24 17:35:09 2015] [error] [client 178.238.222.63] DB Driver: mysql
[Wed Jun 24 17:35:09 2015] [error] [client 178.238.222.63] DB server version: 5.5.43-MariaDB-log
[Wed Jun 24 17:35:09 2015] [error] [client 178.238.222.63] DB server version: 5.5.43-MariaDB-log
[Wed Jun 24 17:35:09 2015] [error] [client 178.238.222.63] PHP Fatal error: Maximum execution time of 30 seconds exceeded in /vhosts/periodicos.proped.pro.br/www/lib/pkp/classes/template/PKPTemplateManager.inc.php on line 1058

At the moment, it seems to me that I have two options:

  • Upgrade my version of OJS (2.4.2.0 → 2.4.6.0);
  • Return the installation to a server with PHP 5.3 (sendmail works ok).
    But my support does not guarantee that sending emails back to running …

Some light?

Cheers,
Carlos

P.S.: How long … I hope everything is great with you.!:o)

Hi @CFreire,

The deprecation warnings are nothing to worry about; are you using SMTP in your config.inc.php? It sounds like you shouldn’t be, and I don’t think you are from your error reports, but it’s worth checking to be sure.

I don’t think OJS’s mail delivery code has changed much from OJS 2.4.2 to 2.4.6, but keeping up to date is always a good idea.

Have you checked your server’s email log? The details of whether you can read it and where to find it will depend on your host.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi Alec,

I was not using SMTP on the old server but after to errors and at the suggestion of support, now configured as SMTP.
Partially worked: only administrative users whose email is in the scope of domain can send email (server’s security rules…).
In short, only myself.
As for the mail log, got everything I could from my server - that information on “caged”, binary, etc …
In time: I have a virtual/personal friend in this support (operating area) that is who is trying to help me (the specific area - sending emails through the site - less know what I …).
He also said that "grep” for my domain and found nothing in maillog postfix. More than that he can not say.
I did not get his answer if there is still no solution to the problem of sending “partial” by SMTP (expected), but if all else fails, I guess I’ll have to create emails in the domain and distribute to publishers and journal managers.

This solution is very bad, but…

In time II:
In my sites “not OJS”, in phpmail (), I can set the “from” always an account in the domain, leaving the real email sender in the reply-to.
In OJS, after setting up the SMTP correctly, I could not make the “from” is always from this domain account… the “from” remains of the “real” sender.
Hence the “partially worked” described above.

Cheers,
Carlos

2.4.6 does have the option to always set the “from” as a domain account, with the reply-to set as the sending user. This is actually the default as of 2.4.5 per SPF, if your Principal Contact in Journal Setup 1.2 is a user on the domain.

If you cannot set the Principal Contact to a domain account, there is an option in config.inc.php “force_default_envelope_sender” which will allow you override the “from” for all journals on the site.

Thanks a lot, ctgraham. It worked!
And was “in my face” all the time (I got my ass MBA).
I got thinking about doing it but gave up - do not ask me why…

Allow envelope sender and set default_envelope_sender: everything to do with the first more complete answer from my support server (the “caged" sendmail in older server x “binary relay" in new server, whatever that means.)

I’ll wait publishers send notification emails (very large) but it worked when tested (one teste with “login as” and another with an real password of one of the editors).

Just do not know if I made a nonsense: my config.inc.php had no lines about “force the default…”
I added these lines.
There was no error reported by the system, but the question was … let these lines or does not matter?

Cheers,
Carlos

To check if a config.inc.php directive is supported by your system, you’ll generally want to look at config.TEMPLATE.inc.php. Your config.inc.php will not be automatically updated with the latest available options in upgrades, but the TEMPLATE file should be.

My config.Template.inc.php also did not have these lines … I leave as is (with lines added manually) or …?

If your OJS version is 2.4.6, you should be fine with the force_default_envelope_sender option. If your version is earlier than 2.4.6, the force_default_envelope_sender will have no effect until you upgrade, but it sounds like you may not need this option if everything is working for you currently.

Ok, my version is 2.4.2 and everything is working.
So… thanks for your patience and explanations.

Regards, Carlos

I have a problem with sending email notification to the reviewer. When I send an email notification to the reviewer, it does not go through. Any help? Many thanks

@roto, please let us know what step from the above troubleshooting you have taken to help to identify the problem, and what error log messages you have found.

Please also report what version of OJS you are running, and whether anything has recently changed.

If you are working with the latest version of OJS, see also this thread: