# {contactfield=firstname} not placing contact first name in email campaign?

**URL:** <https://forum.mautic.org/t/contactfield-firstname-not-placing-contact-first-name-in-email-campaign/28967>\
**Category:** Product Support\
**Created:** [August 16, 2023, 1:47pm UTC](https://forum.mautic.org/t/contactfield-firstname-not-placing-contact-first-name-in-email-campaign/28967 "2023-08-16T13:47:38Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![elsaadj](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/elsaadj/32/672_2.png) [@elsaadj](https://forum.mautic.org/u/elsaadj)\
**Post date:** [August 16, 2023, 1:47pm UTC](https://forum.mautic.org/t/contactfield-firstname-not-placing-contact-first-name-in-email-campaign/28967/1 "2023-08-16T13:47:38Z")

</div>

**Your software**  
My Mautic version is: 4.2.0  
My PHP version is:  
My Database type and version is:

**Your problem**  
My problem is: Using Builder to create email template  
Hi {contactfield=firstname} | there, not placing contact first name in email campaign, email always comes Hi there,

These errors are showing in the log:

Steps I have tried to fix the problem:

---

<div class="post-metadata">

**Author:** ![robm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/robm/32/260_2.png) [@robm](https://forum.mautic.org/u/robm)\
**Post date:** [August 16, 2023, 2:17pm UTC](https://forum.mautic.org/t/contactfield-firstname-not-placing-contact-first-name-in-email-campaign/28967/2 "2023-08-16T14:17:18Z")

</div>

How are you testing?

Are you sending the email via campaign or segment email to test? Using the send example or preview methods don’t merge data.

I assume there is a firstname captured to mautic for each recipient?

---

<div class="post-metadata">

**Author:** ![elsaadj](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/elsaadj/32/672_2.png) [@elsaadj](https://forum.mautic.org/u/elsaadj)\
**Post date:** [August 16, 2023, 4:05pm UTC](https://forum.mautic.org/t/contactfield-firstname-not-placing-contact-first-name-in-email-campaign/28967/3 "2023-08-16T16:05:30Z")

</div>

Tested with campaign (to segment) and contacts have first names.  
It works if I send direct email to the same contact.

---

<div class="post-metadata">

**Author:** ![elsaadj](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/elsaadj/32/672_2.png) [@elsaadj](https://forum.mautic.org/u/elsaadj)\
**Post date:** [August 17, 2023, 4:30pm UTC](https://forum.mautic.org/t/contactfield-firstname-not-placing-contact-first-name-in-email-campaign/28967/4 "2023-08-17T16:30:06Z")

</div>

{contactfield=firstname | there}  
removed the “| there” and seems to work now.

---

<div class="post-metadata">

**Author:** ![robm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/robm/32/260_2.png) [@robm](https://forum.mautic.org/u/robm)\
**Post date:** [August 18, 2023, 6:58am UTC](https://forum.mautic.org/t/contactfield-firstname-not-placing-contact-first-name-in-email-campaign/28967/5 "2023-08-18T06:58:32Z")

</div>

I sent an email with

Hi {contactfield=firstname|there},

And it worked as expected - name was merged and “there” was dropped. Check if you had spaces on either side of the | There should be no spaces.

---

<div class="post-metadata">

**Author:** ![elsaadj](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/elsaadj/32/672_2.png) [@elsaadj](https://forum.mautic.org/u/elsaadj)\
**Post date:** [August 24, 2023, 1:45pm UTC](https://forum.mautic.org/t/contactfield-firstname-not-placing-contact-first-name-in-email-campaign/28967/6 "2023-08-24T13:45:45Z")

</div>

You are correct, I had spaces

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/1X/43c63600fe51440378769136903f1fa2a9a34102.png) [@system](https://forum.mautic.org/u/system)\
**Post date:** [August 28, 2023, 6:13am UTC](https://forum.mautic.org/t/contactfield-firstname-not-placing-contact-first-name-in-email-campaign/28967/7 "2023-08-28T06:13:18Z")

</div>

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.
