# Html email header for custom email templates

**URL:** <https://www.dolibarr.org/forum/t/html-email-header-for-custom-email-templates/19311>\
**Category:** Other native modules\
**Created:** [July 15, 2020, 7:45am UTC](https://www.dolibarr.org/forum/t/html-email-header-for-custom-email-templates/19311 "2020-07-15T07:45:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![phpdev](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/p/50afbb/32.png) [@phpdev](https://www.dolibarr.org/forum/u/phpdev)\
**Post date:** [July 15, 2020, 7:45am UTC](https://www.dolibarr.org/forum/t/html-email-header-for-custom-email-templates/19311/1 "2020-07-15T07:45:55Z")

</div>

Is it possible to create custom email header? I know you can change E-mail templates in settings:

> **[Dolibarr Open Source ERP and CRM wiki documentation](https://wiki.dolibarr.org/index.php/Customize_the_email_sending_message)**
>
> Online wiki documentation of Dolibar ERP CRM software

But this is only the ‘body’ of the email and the ckeditor has ‘cleaned up’ the html source. In order to be compatible with all email clients, the head-tag for all emails must also be customized. This shouldn’t be customizes by each email template but general for all emails. We want to add css declarations in the head for background, table width, …

1. Is there a setting or file to change the general html-head email header?
2. Is it possible to disable ckeditor cleanup for email templates?

Example of email:

 ![email-example](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/0/0ae018fa0698cd878d8f4f8d4ae0f61304840663.jpeg)

---

<div class="post-metadata">

**Author:** ![benchintada](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/b/b38774/32.png) [@benchintada](https://www.dolibarr.org/forum/u/benchintada)\
**Post date:** [February 12, 2024, 10:18am UTC](https://www.dolibarr.org/forum/t/html-email-header-for-custom-email-templates/19311/2 "2024-02-12T10:18:01Z")

</div>

Hi any clue on this?

I want to create my email templates like above screenshot attached by phpdev. How can I do this on Dolibarr?

---

<div class="post-metadata">

**Author:** ![phpdev](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/p/50afbb/32.png) [@phpdev](https://www.dolibarr.org/forum/u/phpdev)\
**Post date:** [March 5, 2024, 11:09am UTC](https://www.dolibarr.org/forum/t/html-email-header-for-custom-email-templates/19311/3 "2024-03-05T11:09:21Z")

</div>

Benchintada,

We solved this with hooks. We add template html header before and footer after email text(editor.)
