# Lead fields in e-mails

**URL:** <https://forum.mautic.org/t/lead-fields-in-e-mails/1896>\
**Category:** Product Support\
**Created:** [June 1, 2015, 12:55pm UTC](https://forum.mautic.org/t/lead-fields-in-e-mails/1896 "2015-06-01T12:55:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![RokDominko](https://avatars.discourse-cdn.com/v4/letter/r/13edae/32.png) [@RokDominko](https://forum.mautic.org/u/RokDominko)\
**Post date:** [June 1, 2015, 12:55pm UTC](https://forum.mautic.org/t/lead-fields-in-e-mails/1896/1 "2015-06-01T12:55:54Z")

</div>

Hi!  
  
  
  
First of all, I would like to say, that you are doing a great job and so far I am very pleased with Mautic.  
  
  
  
I do however have one question. We created a form and placed it into one of our landing pages. After submission of this form an e-mail is sent to the recipient. In the e-mail, we manually added two “personalization” fields: {leadfield=firstname} {leadfield=lastname}. We are doing this with “custom HTML”, NOT “e-mail builder”. These fields work great, as long as people fill out these fileds in the form. If they do not fill out these forms, the sent e-mail containts raw field code. What we expected was, that in such cases nothing would appear in place of this code.  
  
  
  
For example, this is how the header of our e-mail looks like:  
  
  
  
Hi, {leadfield=firstname} {leadfield=lastname}  
  
  
  
If a visitor fills out these fields in the form, the sent mail looks like this:  
  
  
  
Hi, John Doe  
  
  
  
If a visitor does not fill out these fields, the sent mail looks like this:  
  
  
  
Hi, {leadfield=firstname} {leadfield=lastname}  
  
  
  
We would like it to be like this:  
  
  
  
Hi,  
  
  
  
(nothing else).  
  
  
  
Thank you for your answer!  
  
  
  
Cheers,  
  
Rok Dominko  
  
PNV Group

---

<div class="post-metadata">

**Author:** ![RokDominko](https://avatars.discourse-cdn.com/v4/letter/r/13edae/32.png) [@RokDominko](https://forum.mautic.org/u/RokDominko)\
**Post date:** [June 1, 2015, 12:55pm UTC](https://forum.mautic.org/t/lead-fields-in-e-mails/1896/2 "2015-06-01T12:55:54Z")

</div>

Hi!

First of all, I would like to say, that you are doing a great job and so far I am very pleased with Mautic.

I do however have one question. We created a form and placed it into one of our landing pages. After submission of this form an e-mail is sent to the recipient. In the e-mail, we manually added two “personalization” fields: {leadfield=firstname} {leadfield=lastname}. We are doing this with “custom HTML”, NOT “e-mail builder”. These fields work great, as long as people fill out these fileds in the form. If they do not fill out these forms, the sent e-mail containts raw field code. What we expected was, that in such cases nothing would appear in place of this code.

For example, this is how the header of our e-mail looks like:

Hi, {leadfield=firstname} {leadfield=lastname}

If a visitor fills out these fields in the form, the sent mail looks like this:

Hi, John Doe

If a visitor does not fill out these fields, the sent mail looks like this:

Hi, {leadfield=firstname} {leadfield=lastname}

We would like it to be like this:

Hi,

(nothing else).

Thank you for your answer!

Cheers,  
Rok Dominko  
PNV Group

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [June 1, 2015, 1:54pm UTC](https://forum.mautic.org/t/lead-fields-in-e-mails/1896/3 "2015-06-01T13:54:10Z")

</div>

Hello!

that is great question. The email builder will be redesigned in the next release. I tested similar use case as you described on the latest development version and custom email does not display the field code if the field is empty.

The next version should be released this week.

---

<div class="post-metadata">

**Author:** ![RokDominko](https://avatars.discourse-cdn.com/v4/letter/r/13edae/32.png) [@RokDominko](https://forum.mautic.org/u/RokDominko)\
**Post date:** [June 1, 2015, 1:58pm UTC](https://forum.mautic.org/t/lead-fields-in-e-mails/1896/4 "2015-06-01T13:58:02Z")

</div>

HI!

Thank you very much! Looking forward to the new release then!

Cheers,  
Rok Dominko

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [February 2, 2020, 10:59pm UTC](https://forum.mautic.org/t/lead-fields-in-e-mails/1896/5 "2020-02-02T22:59:48Z")

</div>


