Does anyone have group emails working for users?

Ok if anyone is following along my saga… today’s progress, had to edit function getFoldersForSettings so that it doesn’t put out duplicate group folders in the JSON for group folders array that’s used in folder selection, problem solved!

had to modify: updateSubscriptions: function () in EmailUI.js to make the select options work in folder selection. (it kept refreshing every time I clicked!) Problem solved!

had to modify settingsFolderRefresh: function in ajax.js in order to get the group folders from JSON add them to the pick list. Problem solved!

So now I’m kind of back where I started. Everything works, but the users still have access to all folders. In 7.13 there is now security group logic. So hoping with a few tweaks I can get that working! Last problem I hope to get this working in 7.13 and on ward.

Group Emails Season 1 starring Paul Stevens is the coolest thing on Netflix this year!

And the good thing is that the SuiteCRM emails code has material for a dozen more seasons, this won’t end anytime soon! :rofl:


Thanks @pgr one more quick question. If I have changes that apply to 7.12 and 7.13+ do I need to create a PR on both the suitecrm and the core branch?

That question is better for the SalesAgility folks, I am not sure…

But I think this is what is currently in place:

  • Branch hotfix is SuiteCRM 7.12
  • Branch hotfix-7.13 is SuiteCRM 7.13
  • SuiteCRM v8.x is in SuiteCRM-Core repo, branch hotfix

The legacy code in the v7 repos is still going into the v8 package, under public/legacy. That’s likely coming from the hotfix-7.13 branch.

@clemente.raposo can you please confirm?

:grinning: :grinning: :grinning: :grin: :grin: :partying_face: :partying_face: :tada: :tada:

Today’s update! I have Group Emails completely working.

Admin can create group accounts, admin can see all group accounts. User can only see group accounts if they are in the security group that inbound group account is in.

One last small thing to fix, is that group emails show up twice in the listing. I’m sure I can get that fixed too.

Thanks @pgr for all your encouragement!


Incredible work @pstevens and assists by @pgr. Your work shows that these issues are fixable. Hopefully, the PRs get implemented.

@pjdm Just spent all day testing it. I installed the changes on another installation just to be sure. There were a couple of hickups, but I’ve got it worked out. I spent a month trying to figure it all out and there are about half a dozen files that need to change. I kept decent notes of what I changed, but wanted to do a clean test just to make sure. It does work. The only catch is it needs to be 7.13.3+ where Inbound Email Accounts were added to security groups. My solution relies on this. I don’t know how it would ever work without it!

Plan to add the PR’s tomorrow.

The answer to the original question is, YES I DO!!!

This was like a months worth of work to track down multiple problems throughout SuiteCRM that caused the general functionality to not work.

I’ve added all the PR’s and all the info from my notes about what is required here:

I’ve tested on two different installations and it works. I would love for someone else to give it a try and make sure there are no issues with my PR’s. I checked very carefully, but Github for me is a bit of a challenge. So hopefully I did everything mostly right.

This solution will only work in 7.13+ as 7.12 doesn’t have a relationship between security groups and inbound email accounts.

1 Like

Here’s a video walkthrough of the functionality:


Excellent season finale :tada: !

1 Like

Hey @pgr, one more quick question. I’m just doing a double check on my PR’s by adding them to a fresh install of Version 8 for testing. I realized I missed one line in one PR.

For example here: Update SugarFolders.php Re:277 by pstevens71 · Pull Request #281 · salesagility/SuiteCRM-Core · GitHub

I need to add one line in between: 888/889
if (!in_array($a['id'], $groupFolderIds)) {

How do I do that with creating the least amount of mess. (Sorry, I’m still struggling with navigating around Github).

Do I just “edit file” from the commit?

If you update the file in your own repo, that new commit will appear also in the PR you already created.

The PR relates one branch to another branch, whatever is there, will be included in its latest version.

1 Like

Great news!!! Just tested and it works on SuiteCRM 8. However, the cache is kind of tricky. I had to put in developer mode, do the bin/cache/clear thing, and then rebuild all the JS stuff in repair and rebuild and flush my browser cache to get it to work.

1 Like

This is fantastic work Paul.

I have followed through your fixes and failed to notice that I needed 7.13.3. Duh!

So I went ahead and upgraded from 7.13.0 to 7.13.3. Checked that your fixes Paul, were all still there. Did the usual Repair & Rebuild, Repair relationships, Repair Inbound Email Accounts.

Everything seems to be working except for the fact that I still don’t have a ‘Security Groups’ subpanel in the inbound emails. Inbound Email Accounts is not a module in my Studio, so I can’t check the existence of subpanels there.

I have gone as far as deleting all email accounts and making sure they have been deleted from the respective tables etc. But no joy.

Can anyone steer me in the right direction to sort this out please.

Many thanks Terry

Try a Admin / Repair / Repair Relationships and other repairs that look promising

Its not enabled by default. In admin check visible subpanels. Make sure its visible.

Aha and duh again!

Thank you so much again for what you did with the email groups fix. I know how much time goes in to researching this stuff. I have spent hundreds of hours on SuiteCRM and still get hung up on the simplest of things sometimes.

Now all I need to do is work out why my logo image has suddenly stopped working in my emails. But that’s another topic.


Let me if it’s working for you. I’ve tried on like 3 different installations and it worked great. Just want to make sure.

Hi Paul

Somehow I missed this post. Yes it all works great thank you.

I’m now embarking on a mission to get rid of some of the persistent errors in suitecrm.log after sending emails.


@pstevens did you see this PR?

I thought I’d warn you, in case it overlaps with what you did.

1 Like