?
avatar ghazal
ghazal
26 Sep 2016

Steps to reproduce the issue

Mail notification not sent after article creation.

System information

joomla 3.6.2, PHP7

Looks like an unexpected "return" is the culprit.

In /libraries/joomla/mail/mail.php, around line 400

    public function addCc($cc, $name = '')
    {
        // If the carbon copy recipient is an array, add each recipient... otherwise just add the one
        if (isset($cc))
        {
            return $this->add($cc, $name, 'addCC');
        }

        return $this;
    }

After removing "return" from :

return $this->add($cc, $name, 'addCC');

It should work OK.

avatar ghazal ghazal - open - 26 Sep 2016
avatar mbabker
mbabker - comment - 26 Sep 2016

Nope. It's fine. The add method returns $this on success and a Boolean
false on failure. So the fact something isn't sending means an address
wasn't added correctly and an error state was set. You'll need to debug
deeper to see what data is being given to the method and fix the data
source, not change the API.

This can be closed as not a core bug.

On Monday, September 26, 2016, ghazal notifications@github.com wrote:

Steps to reproduce the issue

Mail notification not sent after article creation.
System information

joomla 3.6.2, PHP7

Looks like an unexpected "return" is the culprit.

In /libraries/joomla/mail/mail.php, around line 400

public function addCc($cc, $name = '')    {        // If the carbon copy recipient is an array, add each recipient... otherwise just add the one        if (isset($cc))        {            return $this->add($cc, $name, 'addCC');        }        return $this;    }

After removing "return" from :

return $this->add($cc, $name, 'addCC');

It should work OK.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#12181, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAWfoXarTNzBSWRwNsnxjvU8ZaRgmrPBks5quBJ1gaJpZM4KG3Dy
.

avatar zero-24
zero-24 - comment - 26 Sep 2016

Closing than Thanks Michael

avatar zero-24 zero-24 - change - 26 Sep 2016
Status New Closed
Closed_Date 0000-00-00 00:00:00 2016-09-26 19:02:23
Closed_By zero-24
avatar zero-24 zero-24 - close - 26 Sep 2016
avatar ghazal
ghazal - comment - 26 Sep 2016

Tks for the explanation.
I was not too sure about this, as I said, a "maybe".

Add a Comment

Login with GitHub to post a comment