I have create observer which sends the email. The email is working file but the problem is with the logo. I have added the logo for the all email. All the emails including the sales order shows me the new logo which i updated. Only this one doesn't.

Here is my observer code

    $enableEmail = $this->config->getGeneralConfig('email');
    $ccEmail = explode(",",$this->config->getGeneralConfig('cc_email'));

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

     $fileName = "Order #".$orderId.".pdf";
            $transport = $this->transportBuilder
                ->addAttachment($generated_file->render(), $fileName)

Here is the template header which is responsible to show logo.

      {{template config_path="design/email/header_template"}}

The above code is there in sales order. But sales order show the correct logo.

  • 1
    ->addAttachment is no vanilla magento functionality, maybe the extension you're using is wrong Commented Jun 6, 2019 at 9:25
  • have you define ’email_templates.xml ?
    – Amit Bera
    Commented Jun 6, 2019 at 9:25
  • @AmitBera Yes..
    – Avesh Naik
    Commented Jun 6, 2019 at 9:50
  • @PhilippSander i have commented the statement and checked. Still same problem.
    – Avesh Naik
    Commented Jun 6, 2019 at 9:55

1 Answer 1


Go to content -> Design -> Configuration There is no of record on the basis of theme that are using. go to edit action for all records. Then slelect the transactional email tabs. there u found logo images. Update this images that u want to display in email headers

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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