Jump to content
  • 0

Email Block BCC Character Limit Workaround



I'm using a combination of a submission form and an insert trigger for my mass email solution. The user will use the submission form to select which Department (or all employees) to send the email to. The Department field is a MultiSelect Dropdown, where the selections are being copied to a normal Text field so that the values can be used in a trigger. This text field shows the selected Department values split up by a ',' . They'll also enter the Subject and Message they want to include in the email.

Once submitted, the trigger will identify all users from my Employee_Table that should be included in the email from the submitted Department value. For each matching employee, it will add their email address to the toVariable variable. Once the loop is completed, it will send an email using the email block with the toVariable of all of the matching email addresses in the BCC section. This way, none of the users receiving the email can see anyone else's email address.

My problem is the character limit for BCC, which is 999 characters. When 'All Active Employees' is selected, only about half of the users receive the email due to the other email addresses being cut off from the character limit. 

I'm looking for a solution to where I can still use the BCC function but be able to send the email to all matching email addresses. My first thoughts were to split the toVariable into multiple groups if the original toVariable was greater than 999 characters (such as, use a toVariable2 and toVariable3) and use those in an additional email block. However, I'm not sure how to split the toVariable at the end of an email address instead of cutting off in the middle of one in Triggers.

Another thought was to modify my submission form to query the Employee_Table and get the matching email addresses there, and use javascript to split the toVariables. However, there's an additional hurdle when doing it this way. My Department dropdown values aren't just departments, but also Job Category values. Departments are Office, Safety, Commercial, Commercial Service, and Residential. The Job Category values are Commercial Leads (Com - Lead), Commercial Service Leads (CS - Lead), and Residential Leads (Res - Lead). If "All Active Employees" is selected, it gets all employees in the table where "Active" equals True. My trigger already handles this, but for example if Commercial and Commercial Leads were both selected, the trigger will remove the Commercial Leads value to be looped through since they are already included in the Commercial department. But, it also makes it more difficult for using JavaScript because if Commercial is selected, it would need to query the Department column in Employee_Table to find Employees with a value of "Commercial", but if Commercial Leads was selected, it would need to query the Job_Category column to find Employees with a value of "Com - Lead".

Any thoughts on how to fix this issue are greatly appreciated!



Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Seems like a hard limit for me, the email block can only hold up to 999 regardless of the placeholder. For that, I suggest that we bring it on the ideabox.

The only workaround that I have in mind is to send the email in two groups but in that case, the main recipient will have the email twice and you'll spend twice the email resource. 

Link to comment
Share on other sites

  • 0

@NiceDuck Yeah, what I'm trying to do now is if toVariable (the variable with all of the email addresses) is larger than 999, split it at 500 characters and add the other half to a 2nd variable. Then use two email blocks.

Still not exactly sure how I'll get this working, specially if it is more than ~1500 characters. I'm thinking the below config will grab the first ~500 characters, ending at a ';', which should include the full email address instead of cutting off in the middle of one.


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...