variable fields in emails not getting replaced

I am have an issue with email variables when sending to leads. From the email section, I have my email template defined with $contact_account_name and $contact_first_name. When I send the emails, they are sending blank and not replacing with the proper values. Can anyone guide me on how to troubleshoot this issue.

Thank you,

Sounds like you’re calling the wrong module. Instead of the Contacts module, try calling variables from the Leads module like $lead_assigned_user_name or $lead_full_name.

You’ll need to be more specific if that doesn’t work for you.

I also have this - using the leads table just sends the email with the variable name in - not the actual data.
Tried creating a test lead to another user in the same office and sending the email results in them getting a mail starting with:
Dear $lead_first_name or
Dear $lead_name

Any help would be appreciated…

Hi guys,

Are you using this with standard emails, campaigns or is it sending via workflow?



Hi Will,

I am having the same problem as others - variables don’t get replaced in email. I am sending email via campaigns.

(Emails -> View Email Templates - Create) - For “Type” - I’ve chosen Campaign.

From my findings, if you choose variables from “Contact/Lead/Target”, then send as scheduled campaign, then variables get replaced in email, hooray! But if you choose variables from another selection e.g “Lead”, it does NOT work. I have tested this number of times, is this a bug??? See below screenshot:

BTW, got email saying that SuiteCRM 7.1.2 has been released lately?
Do you know if this issue if fixed in SuiteCRM 7.1.2? -

I have been doing another email test with variables, this time sending email via workflow, and interestingly all variables got replaced in email - works fine! even inserting variables from “Lead” selection and not just “Contact/Lead/Target” selection, so it looks like the variables bug/ issue appears when sending email via campaign only? Can others check it out please?

This issue is, so far as I can see, still a problem, and a major one. The onyl time I can get variables replaced in emails is to the the contact/lead/target selection in the template and then ojnly if the Contact record is selected to send the email to. It just doesn’t work for Leads or Targets (the two you most often want to send emails to), the variable name is passed to the email as in “Dear $prospect_first_name”.

I find this hard to believe, it is so fundamental to CRM operation (like simple mailmerge).

What is happening here? Come on guys find a fix or workaround and saying “use Workflow” is not a workaround that’s a copout.

BTW this is still an issue with Suitecrm 7.2.2
Dick Collard

any update on inserting variables from leads in mail merge? I am having this issue in SuiteCRM 7.3.

Any updates on this problem? testing with 7.8.8 and the issue is still not resolved… a lot of variables are proposed but very few are working…

or… is there any way that I can put an email address id (hidden would be even better) in an email template?
the idea is that within a campaign I would put the tracker there for a "contact us " form
from the id then I can open a case with the right account/contact…


I’m having a similar issue. Not all Variables are not replaced (please see attached). Would you kindly update this post with the solution you found? I’m using version 7.9.7. Thank you