OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



cannot send reset password confirmation email

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

cannot send reset password confirmation email

Postby birkok » Thu Mar 25, 2010 2:44 am

We use OJS 2.3.1.2
When a user tries to reset password via "forgot your password" link, no confirmation mail send to registered email.

I have found that this occur only when user's name has Turkish letter (like Ç,Ö,Ğ,Ş,İ). When those letters have been changed to (C,O,G,S,I), confirmation email is sent.

Is there any way to correct problem?

Thanks in advance

C. Birkok
birkok
 
Posts: 80
Joined: Sat Sep 22, 2007 5:12 am

Re: cannot send reset password confirmation email

Postby asmecher » Wed Apr 14, 2010 10:38 am

Hi Cuneyt,

Is there a chance that the problem is only occurring when the Turkish language is being used on the language pulldown? We've tried to duplicate this locally with Turkish characters and were unable to do so.

Are you using SMTP in your config.inc.php?

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8470
Joined: Wed Aug 10, 2005 12:56 pm

Re: cannot send reset password confirmation email

Postby birkok » Thu Apr 15, 2010 12:37 am

Thank you Alex for your consideration with problem.

No it occurs when locale changed to both Turkish and English, but only some Turkish letters case not all of them.
Actually there are two problem probably same reasoned:
1. If a user name or last name contains some Turkish letter, no password reset email send.
2. Some prepared Turkish emails cannot be sent. If I change the subject field sentence of the email from Turkish to English sentence (email body remains in Turkish), the mail normally send.

I have discovered that those prepared Turkish emails cannot be sent:
- Article Review Request
- Submission Review Reminder
- Request for Review Canceled

And probably some others too, especially " Automated Submission Review Reminder" which none of the reviewers gets reminder mail (cron job is configured).

I don't use SMTP (gmail app. doesn't work). I use OJS's phpmailer.

Regards
birkok
 
Posts: 80
Joined: Sat Sep 22, 2007 5:12 am

Re: cannot send reset password confirmation email

Postby asmecher » Thu Apr 15, 2010 9:58 am

Hi Cuneyt,

Can you check your local MTA's logs to see if there are any messages there?

As I recall, you're using the modification at http://pkp.sfu.ca/support/forum/viewtopic.php?f=8&t=2809&start=0 for Turkish language. Are there any other locale-related modifications in your installation?

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8470
Joined: Wed Aug 10, 2005 12:56 pm

Re: cannot send reset password confirmation email

Postby birkok » Thu Apr 15, 2010 10:31 am

Unfortunately I don't know how to check "local MTA's logs".

But I did the following modifications as recommended from this forum:

1)
Marc, you should be able to do this by simply changing the getLocalizedGalleys function in classes/article/PublishedArticle.inc.php to:

function &getLocalizedGalleys() {
$allGalleys =& $this->getData('galleys');
return $allGalleys;
}

2) commented out following this file: /lib/pkp/classes/i18n/PKPLocale.inc.php

// if (!@setlocale(LC_ALL, $sysLocale, $locale)) {
// // For PHP < 4.3.0
// if(setlocale(LC_ALL, $sysLocale) != $sysLocale) {
// setlocale(LC_ALL, $locale);
// }
// }

(treatment from viewtopic.php?p=10191)


3) And for database, deleted some duplicated fields occurred while upgrading to OJS 2312:

SELECT * FROM user_settings WHERE setting_name = 'biography' AND (locale IS NULL OR locale = '');
birkok
 
Posts: 80
Joined: Sat Sep 22, 2007 5:12 am

Re: cannot send reset password confirmation email

Postby asmecher » Thu Apr 15, 2010 10:51 am

Hi Cuneyt,

The local MTA is going to be Exim or something similar. You should have logs for it in /var/log or /var/log/mail, but the exact location will depend on how your server is configured.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8470
Joined: Wed Aug 10, 2005 12:56 pm

Re: cannot send reset password confirmation email

Postby birkok » Thu Apr 15, 2010 11:14 am

Sorry, I cannot reach there. I have only ftp access to server
birkok
 
Posts: 80
Joined: Sat Sep 22, 2007 5:12 am

Re: cannot send reset password confirmation email

Postby asmecher » Thu Apr 15, 2010 11:43 am

Hi Cuneyt,

If you're not using SMTP, then OJS will use PHP's mail() function to send email (see http://ca2.php.net/manual/en/function.mail.php). It's called from classes/core/String.inc.php in the mail() function, and before that, from classes/mail/Mail.inc.php in the send() function.

Without the MTA log, it'll be tough to tell -- you might check with your host whether they provide access to mail sending logs from your account. Otherwise, the best way to debug this will be as follows:

1) Determine whether the mail() call is returning true or false. If it's returning true, then there's nothing we can do from within OJS to tell why the message isn't sending. This means it's being accepted for delivery by the MTA, but never actually sent for some reason.

2) If mail() is returning false, then we know the MTA is rejecting the message, but we don't know why. I'd suggest modifying OJS temporarily to dump the parameters to that function to a file or something similar so that they can be inspected more closely.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8470
Joined: Wed Aug 10, 2005 12:56 pm

Re: cannot send reset password confirmation email

Postby birkok » Sat Apr 17, 2010 10:01 pm

I asked MTA log from my server tecs. They send me following report. It seems systems mail send functions properly.

------------------
We are sorry for possible inconvenience. As we have checked php mail() function is working fine on the server. We have created test mail script and email from it insanbilimleri.com/New_File.php was successfully delivered to destination. The issue you faced with seems to be related to your application error as the only message we get after submitting your form was "/insanbilimleri.com". Please contact with your application developers in order to verify the reason of such message instead of common reply. Thank you.
birkok
 
Posts: 80
Joined: Sat Sep 22, 2007 5:12 am

Re: cannot send reset password confirmation email

Postby asmecher » Sun Apr 18, 2010 12:44 pm

Hi Cuneyt,

Unfortunately this doesn't get us much further -- we've already established that mail() is broadly working, but in some situations email isn't getting delivered. I'm not sure what they mean by "the only message we get after submitting your form was "/insanbilimleri.com"" -- could you get further clarification on that? Is it an error message from the server log, or a redirect, or something else? What form are they submitting?

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8470
Joined: Wed Aug 10, 2005 12:56 pm

Re: cannot send reset password confirmation email

Postby birkok » Mon Apr 19, 2010 12:56 am

It is about resetting password which I pointed them.

At this "Reset Password" page (http://www.insanbilimleri.com/ojs/index ... stPassword)
If you put this test user email (birkok@hotmail.com) which contains Turkish letters (ğ,ş,ı, etc), you get just blank page with "/insanbilimleri.com" in it. And no mail sent.

It indicates that only OJS' reset password form doesn't work that user name has Turkish letters. Other forms and cases work fine.
birkok
 
Posts: 80
Joined: Sat Sep 22, 2007 5:12 am

Re: cannot send reset password confirmation email

Postby asmecher » Mon Apr 19, 2010 8:28 am

Hi Cuneyt,

Ah -- a blank page usually indicates a PHP error. See http://pkp.sfu.ca/wiki/index.php/PKP_Frequently_Asked_Questions#When_I_click_some_button_or_follow_some_link.2C_I.27m_left_with_a_blank_page._What_do_I_do.3F.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8470
Joined: Wed Aug 10, 2005 12:56 pm

Re: cannot send reset password confirmation email

Postby birkok » Mon Apr 19, 2010 8:42 am

I have already put the error command in second line in index.php as follow, but no error message is given:

<?php
ini_set('display_errors', E_ALL);
/**
birkok
 
Posts: 80
Joined: Sat Sep 22, 2007 5:12 am

Re: cannot send reset password confirmation email

Postby asmecher » Mon Apr 19, 2010 8:57 am

Hi Cuneyt,

The next best way to debug a blank page is to figure out where PHP is dying. Find the requestResetPassword function in pages/login/LoginHandler.inc.php and add the following line at the top of the function (just below the opening brace):
Code: Select all
die('Testing');
This will break the password reset function, but will tell us whether or not you're getting to that point before PHP dies. Let me know if you see the "Testing' error message when you try the reset. If you do, then move it down to just above the $mail->send() function call and try again.

If you see it there, then proceed into the send() function of classes/mail/Mail.inc.php and see if you can figure out likewise where in that function PHP is dying, or if it's getting through to the String::mail(...) call near the bottom.

Unfortunately this is one of the more painful aspects of debugging PHP.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8470
Joined: Wed Aug 10, 2005 12:56 pm

Re: cannot send reset password confirmation email

Postby birkok » Mon Apr 19, 2010 9:27 am

1. when put the code in "LoginHandler.inc.php" file, 'Testing' is seen in page

2. there is no such a file in my installation: classes/mail/Mail.inc.php
only those three:
ArticleMailTemplate.inc.php
EmailTemplateDAO.inc.php
MailTemplate.inc.php

But I tried the MailTemplate.inc.php and checked with "die('Testing');" , I see testing word every time.
birkok
 
Posts: 80
Joined: Sat Sep 22, 2007 5:12 am

Next

Return to OJS Technical Support

Who is online

Users browsing this forum: No registered users and 5 guests