Question

How to get custom email templates list collection in magento2. how to get the collection

Was it helpful?

Solution

It is working for me.

$objectManager = \Magento\Framework\App\ObjectManager::getInstance(); 
$alltemplele = $objectManager->get('\Magento\Email\Model\ResourceModel\Template\Collection');
            $alltemplele = $alltemplele->toOptionArray();
print_r($alltemplele_data);

OTHER TIPS

try with below code for get email templates :

  $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); 
  $alltemplele = $objectManager->get('\Magento\Email\Model\ResourceModel\Template\Collection');

  $alltemplele_data = $alltemplele->toOptionArray();;
  print_r($alltemplele_data);

i hope its work for you.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top