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, 2017 at 11:19
  • Have you resolved this issue ? Apr 25, 2019 at 13:50

1 Answer 1


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. Sep 1, 2020 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.