Magento 2.2.4 – Subscription Success Mail Not Sent After Confirmation

magento2newsletter

I enabled need to confirm options "Yes".

Stores > Configuration > Customers > Newsletter > Subscription Options > Need to Confirm

So, user confirm subscription link mail not send to the user after confirm subscription.

How to do that after confirmation newsletter subscribe successfully mail will be sent to that user.

Best Answer

You just need to apply this below changes on this path :-

Magento\Newsletter\Model\Subscriber.php

    public function confirm($code) {

       if ($this->getCode() == $code) {
          $this->setStatus(self::STATUS_SUBSCRIBED) ->setStatusChanged(true) ->save();

         $this->sendConfirmationSuccessEmail();

         return true;
       }

         return false;

    }

Clear cache and check your output.