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 ->setTemplateIdentifier($template) ->setTemplateOptions ( $templateOptions ) ->setTemplateVars($content) ->setFrom($sender) ->addTo($email) ->addAttachment($generated_file->render(), $fileName) ->addCc($ccEmail) ->getTransport(); $transport->sendMessage();
Here is the template header which is responsible to show logo.
The above code is there in sales order. But sales order show the correct logo.