v7.11.1 - Campaign email variables fail: [ERROR] Unable to find relationship emails_email_templates

Campaign email variables ($contact_firs_name etc.) are not populated. Test emails are successfully delivered. Bounced email are successfully processed.

New upgrade to v7.11.1 and PHP Version 7.2.15 and ubuntu0.18.04.1

The only error that gets logged is below. Connected or coincidence?

Thu Feb 14 12:51:11 2019 [11916][1][ERROR] Unable to find relationship emails_email_templates
Thu Feb 14 12:51:11 2019 [11916][1][ERROR] Saving Email with invalid From name and/or Address. Details:
From field is not set.
From-name is not set.
From name is not set.
codes:1, 7, 10

Since this is an upgrade, I suggest removing and re-adding email accounts to try and get rid of those log messages.

The code to replace variables has been touched in this release, to fix bugs. It is possible that some other new bug was introduced, but I haven’t seen others complaining, and this was tested specifically before release.

Please try my suggestion and then keep me updated on this. Thanks.

@PGR, which “email accounts”? Just the outgoing? Or both outgoing and incoming, including the bounce handling?

If I remove the bounce handling account, will that affect existing campaigns which are still using it?

Problem is worse now. I removed all email accounts (inbound and outbound) then created a new SMTP outbound account. Email won’t send now.

Also, even when I delete ALL email accounts, iI can still see the old Outbound account in my Profile >> Email Settings >> “Outgoing SMTP Mail Servers”

That shouldn’t be there, right?

Remember that Accounts are set both in individual user’s accounts, and in Admin / Outbound Email and Admin / Inbound Email.

When I get confused about configurations I always find it helpful to track things directly from the database, tables inbound_email and outbound_email

Having the same problem with 7.11.2 - email variables are not populating in campaign emails.

This is a clean install of 7.11.2
Apache Version 2.4.38
PHP Version 7.2.15
MySQL Version 10.1.38-MariaDB

I created an email template with variables and sent it to a seed target list and the variables are blank in the sent e-mail:

Subject: , Tracking Variables for SuiteCRM
Message-ID: <EtXQT59mf1Eo3OTA28maZ2kyqWsATgX6fU7GyWETA@crm.regcfinvesting.com>
X-Mailer: PHPMailer 6.0.6 (https://github.com/PHPMailer/PHPMailer)
X-CampTrackID: dfb294f1-2062-c814-d43c-5c71574f487e
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="b1_EtXQT59mf1Eo3OTA28maZ2kyqWsATgX6fU7GyWETA"

Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Tracking Variables

- First Name:=20
- Last Name:=20
- Full Name:=20

To remove yourself from this email list go to https://crm.regcfinvesting.co=

@scott, there’s another thread on the same issue, link below. I will attempt to create an issue in Github early next week. As far as I can see, the devs think they have fixed this new problem (email variable used to work fine for me, back in 7.10.7) but they haven’t. It seems it works for some and not for others.

Try this link: https://suitecrm.com/suitecrm/forum/suitecrm-7-0-discussion/17861-email-template-insert-variable

@stephenmchugh: Thanks for following up and for creating an issue for this when you get a chance. Hopefully they can release an update with a fix soon. This functionality is pretty critical to CRM.


Agreed, this is core functionality. I didn’t need to create a new issue. I’ve updated an existing issue in Github (issue link below) but the devs closed it back in January, presumably because they think they’ve fixed it! I guess you and I are living proof they are mistaken :wink:

I’ve asked @pgr how to get it re-opened. Stand by for an answer.


@scott, the issue on Github has been re-opened. It’s labeled as High Priority so fingers crossed…

1 Like

@stephenmchugh - thanks for the update! Fingers crossed, indeed!

I really want to be able to shift more of my email marketing to Suite and this is definitely an impediment. I actually tried switching my PHP version down to 7.1 and then upgraded to 7.3 just to see if it was a weird PHP issue, but the problem persists regardless.



I don’t get it. Perhaps @PGR or someone from Sales Agility could comment? We are seriously considering moving to the Sales Agility hosted service but my problem is that no-one seems concerned that this key functionality doesn’t work. I can only assume that no-one is using SuiteCRM for e-mail marketing because lead variables don’t work! If that assumption is correct, are there other issues I don’t about?

@scott… did you see this thread? !!!


1 Like

@stephenmchugh - My problem with the target list variables is occurring on a clean 7.11.x install, and those changes already appear to be there, so unfortunately I don’t see a fix there. Did you try doing something with that, and did it work?

No, Target and Lead variables not working here (7.11.3) for Campaigns which is frustrating because it’s key functionality for any CRM. Double the frustration because it used to work fine back in the early days of 7.10

However, Contact variables DO work. I can only confirm that last name and first name for a Contact work, as they are the only two I tested.

I haven’t tested variables in one-off emails but I understand from other threads that they are borked too.


‘Angry from Manchester’ :stuck_out_tongue:

I got Lead variables to work!!! Props to ‘sru001’ on Github, post https://github.com/salesagility/SuiteCRM/issues/6535)

It seems so obvious now:

lead_first_name: $lead_first_name

lead_last_name: $lead_last_name

lead_name: $lead_name

BTW, note that Target variables still use the old “prospects.” naming:

Target first name: $prospect_first_name

Target last name: $prospect_last_name

Target name: $prospect_name



@stephenmchugh Thanks, tried to find a quick fix but it’s over my head. I expect it to miss a bean identification pass through based on the to send to lead/contact/target.

Hope a fix is found swiftly. Then we can modify all templates again _/

We have a mix of Contacts and Leads for our campaigns, so our quick fix for a personalized email looks like this:

“Hi $lead_first_name$contact_first_name, yada yada…”

(note that you don’t need a space between ‘$lead_first_name’ and ‘$contact_first_name’)

Works fine.

Was the issue for Cross Variable names in Email Templates resolved?
In an Email Template to Contact, some details from Lead are being pulled but Email Templates are only able to Translate Information for a Single Bean (module)

issue logged at https://github.com/salesagility/SuiteCRM/issues/8840