jDownloadsownloads.com

Advertisement
Advertisement:

Author Topic: Download notification email not working - [Not a jDownloads problem]  (Read 154 times)

0 Members and 1 Guest are viewing this topic.

Offline marcow

  • Newbie
  • *
  • Posts: 7
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.
« Last Edit: 01.09.2017 19:10:18 by Arno »

Offline ColinM

  • Moderator
  • *
  • Posts: 3.029
Re: Download notification email not working
« Reply #1 on: 31.08.2017 13:11:29 »
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

Offline marcow

  • Newbie
  • *
  • Posts: 7
Re: Download notification email not working
« Reply #2 on: 31.08.2017 13:42:55 »
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.

Offline marcow

  • Newbie
  • *
  • Posts: 7
Re: Download notification email not working
« Reply #3 on: 01.09.2017 08:41:30 »
I have no idea how to find any debug info which could help me find the error at hand. Anyone any ideas?

Offline marcow

  • Newbie
  • *
  • Posts: 7
Re: Download notification email not working
« Reply #4 on: 01.09.2017 09:57:17 »
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.

..

Offline marcow

  • Newbie
  • *
  • Posts: 7
Re: Download notification email not working
« Reply #5 on: 01.09.2017 10:46:58 »
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.

Offline Arno

  • Administrator
  • ***
  • Posts: 12.072
    • jDownloads.com
Re: Download notification email not working
« Reply #6 on: 01.09.2017 11:50:13 »
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!

Offline marcow

  • Newbie
  • *
  • Posts: 7
Re: Download notification email not working
« Reply #7 on: 01.09.2017 11:56:46 »
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.

Offline Arno

  • Administrator
  • ***
  • Posts: 12.072
    • jDownloads.com
Re: Download notification email not working
« Reply #8 on: 01.09.2017 13:03:50 »
Hi Marco,
I could not confirm your problem. See pic. Maybe an abnormality with your server settings or Joomla installation?
« Last Edit: 01.09.2017 13:05:45 by Arno »
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!

Offline marcow

  • Newbie
  • *
  • Posts: 7
Re: Download notification email not working
« Reply #9 on: 01.09.2017 16:00:00 »
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.

 

Advertisement