I have created custom email template in my custom module for contact form. while submitting form email should have to trigger to admin and end user and email also triggering as per requirement but it is taking header and footer from luma theme. But we need header and footer from our custom theme. Please, below attachment for more clarity: enter image description here

Thanks in advance !

  • I am also facing issue – Pandurang Dec 8 '17 at 11:19
  • Have you resolved this issue ? – Mohammad Faizan Apr 25 '19 at 13:50

I used below code to send mail to customer

$templateOptions = array(
            'area' => Area::AREA_FRONTEND, 
            'store' => \Magento\Store\Model\Store::DEFAULT_STORE_ID

 $from = array('email' => $seller_email, 'name' => $post['name']);

            $to = array($goshop_email);
            $transport = $this->_transportBuilder->setTemplateIdentifier($template_id)


'store' => \Magento\Store\Model\Store::DEFAULT_STORE_ID


'store' => $this->storeManager->getStore()->getId() 


$this->storeManager is alise of Magento\Store\Model\StoreManagerInterface
  • perfect... I was doing same mistake. Your have saved my time. – Sameer Bhayani Sep 1 '20 at 5:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.