Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

You can create a method in MyModule\ProductAlert\Block\Email\Stock You need to inject \Magento\Customer\Model\Session $customerSession, class to get customer Email. protected $customerSession; public function __construct( ... \Magento\Customer\Model\Session $customerSession, ... ) { ... $this->customerSession = $customerSession; ....

Only top voted, non community-wiki answers of a minimum length are eligible