Email notifications display tokens instead of empty space

Your software
My Mautic version is: 4.4.12
My PHP version is: 8.0
My Database type and version is: MariaDB 10.6

Your problem
My problem is: After we setup the email notifications when someone submits a form, any empty field displays the token in the email notification. not an empty space as expected. How can I fix this? Thanks

These errors are showing in the log: nothing in the logs

Steps I have tried to fix the problem:

  1. Setup a form
  2. Setup email notifications for this form
  3. Add the fields to this notification
  4. Test leaving some empty fields in the form
1 Like

It still happens in Mautic 6. It’s a serious professionalism issue when you deliver results to a client. Automating is fine, but this is unacceptable.

I had the exact same issue in Mautic 4.4.x. When a field was empty, the notification email showed the token like {company} instead of leaving it blank. It was fixed after disabling “Show if empty” in the field settings and rebuilding the notification template using the fallback version {company|}. Unfortunately, Mautic doesn’t apply this automatically.