News:

Support for jDownloads 3 has been ended
Since 17 August 2023 Joomla.org has discontinued support for Joomla 3.x. Therefore, we will no longer offer official support for our Joomla 3 jDownloads version 3.9.x from January 2024.
Please update your website to the latest Joomla version (Joomla 4 or Joomla 5) as soon as possible. Afterwards, please update jDownloads to the latest published version. The longer you delay, the more difficult the upgrade process for your website is likely to be.

Main Menu
Support-Forum

Download notification email not working - [Not a jDownloads problem]

Started by marcow, 31.08.2017 08:30:25

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

marcow

Hi Arno,

I'm having trouble receiving email notifications of user downloads.

Joomla 3.7.5
jDownloads 3.2.54
PHP 5.6.31

Although the Joomla is set to use PHP Mail, and the test mails by Joomla do arrive, the jDownload notifications do not.

Please advice.
Thanks,
Marco.
  •  

ColinM

Marco
I have just checked on my test site and all is well.
Could you first check your mail setup in the Joomla! Global Config - Server tab.
Ensure you have things set up and make sure field 'Mailer' set to  PHP mail - see pic
That has a Test Email button.  Does that send an email OK?
Colin

[gelöscht durch Administrator]
Colin M
  •  

marcow

Hi, Thanks for responding,

As I wrote in my initial message:
  "Although the Joomla is set to use PHP Mail, and the test mails by Joomla do arrive, the jDownload notifications do not."

Any pointers would be helpful. If I can provide more info, please ask.

Regards,
Marco.
  •  

marcow

I have no idea how to find any debug info which could help me find the error at hand. Anyone any ideas?
  •  

marcow

Getting deeper into the code.

jDownloads uses a mailer object, which returns an error about sendmail not getting instantiated.
Joomla uses PHP Mail which uses JMail. JMail is a wrapper around PHP Mailer.

There obviously is a difference in behaviour or configuration. The test email by Joomla, using PHP Mail, works fine.
The jDownloads mailer object does not.

..
  •  

marcow

Mmh, finally managed to track down the issue. The test mail by Joomla was sent properly, but all other emails in Joomla failed to arrive. Strange, and it put me barking up the wrong tree.

Anyway, as soon as I configured Joomla to use SMTP, everything started working for Joomla itself.

Then my debug code was still telling me jDownloads didn't send the mail. This could be due to wrong "mailer->send" return handling. So I changed a few lines in jdownloadshelper.php to fix this.

        // Send the Mail
// NO LONGER::        $result = $mailer->send();
// FIXED THE RESULT HANLDING:
        if ( $mailer->send() ) {
            return true;
        } else {
            //JFactory::getApplication()->enqueueMessage(JText::_('COM_JDOWNLOADS_DB_ERROR'), 'error');
            return false;
        }         

I hope my little adventure may help others.
  •  

Arno

Hi Marco,
I wonder that we should have a bug here. I know that this functionality is use very often by our users. And nobody has until today problems reported like yours. Also for Colin works it. But I will check it in the next days.
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  

marcow

Hi Arno,

I only noticed it because I was debugging the "if then else" in combination with a "echo "NOT SEND"; die;" routine which triggered while I finally managed to receive an email. Perhaps I mistook during coding/debugging/fixing, but I believe the current adjustments work appropriately.
  •  

Arno

#8
Hi Marco,
I could not confirm your problem. See pic. Maybe an abnormality with your server settings or Joomla installation?


[gelöscht durch Administrator]
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  

marcow

My site is now working. So no critical issue right now. And you're correct on the site configuration. It is now obvious that it was all due to a "sendmail" configuration issue.

Thanks for trying and assisting.

Ps. I do think my adjustment in code if ($mailer->send()) { is correct. Could you check that. I'm not a daily PHP coder.
  •