Skip to main content

Troubleshooting: Understand and correct error messages in Targeted Email

  • January 21, 2025
  • 2 replies
  • 78 views

Happie Pingol
Forum|alt.badge.img+1

When you are working with conditional content in Targeted Email, it’s important to make sure that your syntax is correct to make sure you get the results you expect. If you have an error, you may see a warning or error message alerting you that your conditional statements or content needs a correction.

 

Check this list to understand the response message and how you can correct it.

 

Error Text

Error Text

Causes/Resolutions

Message contains click tracking URLs.

If you copy/pasted the content of your message from a message previously sent via Targeted Email, you likely unknowingly copied over click tracking links that will reference your own contact record. This would obviously be bad for tracking purposes so we fail out the message. Look for any link that starts with “click.” and change those URLs to the intended URL. Alternatively, you can replicate the previously sent email using “Copy From Existing” when creating a draft email.

Message contains an invalid URL.

This can be caused by several issues. Check your email content, primarily images and links, for any url that would not properly function. Most commonly in the Drag and Drop Editor, this will be caused by an image containing “…” in the URL value. If you’re unable to determine where the link is send a sample and check the HTML code; otherwise feel free to reach out to support for further diagnosing.

An '{0}' keyword is missing an 'if' conditional statement

You will see this error if your your content contains an {{end}} with no {{if}} somewhere before it. Check to make sure that you haven’t accidentally removed your if statment or that you didn’t accidentally insert an end statement that isn’t needed.

An 'elseif' conditional statement is missing an 'if' or 'end' keyword

Your {{elseif}} statement always needs {{if …}} preceeding it and {{end}} resolving it. If you’ve forgotten to add these or accidentally deleted one, you will see this error.

An 'if' conditional statement is missing an 'end' keyword

Your {{if}} statement always needs to resolve with an {{end}}. Check your content to make sure you have an end statement after your if statement.

A merge field is missing the end curly braces ('}}')

This can happen if:

  • You’ve typed over a merge field

  • You accidentally deleted the end curly braces

  • You inserted newlines in merge fields

Merge field '{0}' contains an unexpected character, such as punctuation or a space

This happens if you add text to a merge field that shouldn’t be there. You can fix this by replacing the text within the merge field with the expected value for the field.

Example:

{{Disclaimer}} should be changed to {{Paid for By Pepper for the People}}

A calculation cannot be performed on '{0}' because it is not a number

This can happen if you:

  • Made up merge field syntax e.g. {{my.04_Program_URL:default=edit me}}

  • Made up merge field names that start with digits

A calculation cannot be performed on '{0}' because it is not a number or is a numeric field that may be empty. Add an 'if' conditional statement if this is a numeric field.

You can see this error when using contribution fields if you:

  • Need to nest contrib fields in an if

  • Need to use zero_if_null

 

This can also be an error if:

  • You used an incorrect/non-existent merge field

For example, if you changed "{{FirstName}}" to "{{First-Name}}" the system would assume that you are creating a new merge field that requires calculation.

Moreover, EATools and prior versions of our merge field syntax are not compatible with Targeted Email. Make sure your conditional statements match what you see in our documentation.

Read more on using contribution fields in Conditional Content

There is a syntax error near '{0}', such as punctuation or a space

You’ll see this if you:

  • Have a partial merge tag (closing but no opening curlies or vice-versa)

  • Typed over a merge field

  • Made up merge field or added spaces to merge field names ("Organizations Name", "Unsubscribe Link")

  • Nested merge fields

  • Are missing close parens on macros

There is an unexpected character near '{0}', such as punctuation or a space

To correct this, look for:

  • Markup inside a merge tag

  • Smartquotes

  • if statement missing condition

  • Random single/double quotes inserted into merge field names

  • encoded values (spaces) inside merge fields

Warning Text

Warning Text

Causes/Resolutions

Per our Terms of Service and based on CAN-SPAM requirements, a legitimate physical address should be visible to the email recipient.

In order to help ensure our clients adhere to US sending requirements, we display this warning if the merge field {{OrganizationAddress}} is not present. If you are displaying your organization’s address without using the merge field or your organization has determined the email you’re about to send does not need to adhere to CAN-SPAM or other legal requirements, you can ignore this message.

For more info on this requirement in CAN-SPAM, check out #4 here.

[Merge Field] is present multiple times

The merge field specified is present in either your HTML or Plaintext email multiple times. If you’re using the Classic Editor this is likely due to a theme or reusable, otherwise, the merge field exists multiple times within your content. Check for multiple merge field values and remove the unintended one or ignore this message altogether if this is intended.

Your email is over 102,000 characters. Some Email programs may clip your content

Consider simplifying your content. If using the Drag & Drop Editor, using fewer rows and columns in your content is a good way to make it smaller.

SPF/DKIM Invalid

SPF & DKIM values on your DNS record will alert inbox providers that messages sent through Targeted Email are authenticated and approved by your organization.

Read setup instructions
Read more about giving us permission to send on your behalf

Using a Personal Email

Using a personal email address like @gmail.com or @yahoo.com is often a tactic used by people who send spam. We highly recommend purchasing your own domain to send email as you’ll be able to authenticate email sent from that domain as legitimate and email providers will be more likely to trust those emails.

Read more on improving your email reputation

 

 

2 replies

  • First Timer
  • January 26, 2026

And what does it mean when the error text is “Remove any <script> syntax from the 'HTML Message'”?


peter ritcheson
Forum|alt.badge.img+2

That error occurs when JavaScript code is detected in email content, which isn’t allowed in TGE.

Some Causes:

  • Browser extensions: ExpressVPN and Grammerly extensions are known to inject JavaScript snippets into HTML content during editing.
  • Copy-Paste issues: When copying content from websites or other sources, JavaScript can inadvertently be included.