Send mail from custom module Magento 2

To send custom email in Magento 2 using the module, We need to create a custom module to send email to a specific recipient.

There are many default Magento mail template are available like Sales Order, Customer mails, Contacts and so on. if you want to send your custom mail functionality using Magento 2, You need to create a simple module and create custom template file using Module for mail body.

Continue reading “Send mail from custom module Magento 2”

How to get customer data by customer email in magento 2?

You can get customer information by just passing customer email using below code snippet, Create Block file,

Call getCustomerByEmail() function in template file,

Get all customer data by below way,
echo “<pre>”;print_r($customer->__toArray());

For, Get customer data by customer id using below link,