Select to view content in your preferred language

Arcade and email from Popup issues

343
7
Jump to solution
a month ago
Labels (1)
CFECAK
by
Occasional Contributor

I am working with arcade to create a send email link in a popup, I have 89 email addresses I need to use.  When I use 47 emails address in the bcc variable, it generates the email.  When I enter all the emails in the same bcc variable it will not generate the email.  If I just paste the emails into a new email it recognizes them all.  Is there some limitation on characters, or some other reason others might know?

The 47 emails is 1061 characters.

All emails are 2100 characters

 

var bcc = "";
var subject = "Road Closure for " + $feature.street;
var AdjStartTime = Text($feature.starttime,'h:mm A')
var AdjEndTime = Text($feature.endtime,'h:mm A')
var AdjStartDate = Text($feature.starttime,'MM/DD/YYYY')
var AdjEndDate = Text($feature.endtime,'MM/DD/YYYY')
var body = "Test;
var params = {bcc: bcc,
subject: subject,
body: body};
var url = "mailto:?bcc" + "?" + UrlEncode(params);
url = Replace(url, "TextFormatting.NewLine", "%0D%0A");
return url

0 Kudos
1 Solution

Accepted Solutions
SteveCole
Honored Contributor

There are URL length limits depending on the browser so perhaps you're hitting this limit.

View solution in original post

7 Replies
AustinAverill
Frequent Contributor

If this is a copy and paste of your code, the assignment of the body variable is missing an end quote and would likely cause "Test execution error". In your url variable assignment, you are including the argument for BBC (not a valid param) and then restarting the arguments to include your listed parameters. You might consider revising your url assignment to look something more like: 

var url = `mailto:?${UrlEncode(params)}`
0 Kudos
AustinAverill
Frequent Contributor

If making these adjustments doesn't prove to be fruitful, try assigning your coded parameters to a variable and sending that to console so you can review that portion of the output.

0 Kudos
CFECAK
by
Occasional Contributor

 

Here is the corrected code.  Output shows emails with the ... so it looks like it should generate the email, but does not.

 

0 Kudos
SteveCole
Honored Contributor

There are URL length limits depending on the browser so perhaps you're hitting this limit.

CFECAK
by
Occasional Contributor

This is the issue.  I am using chrome, when I switched to firefox, all the code worked just as it should.

0 Kudos
AustinAverill
Frequent Contributor

Darn, I thought Chrome didn't have that small of a character limit. Unfortunate.

Are the e-mails all in your organization? You could always make a group e-mail in your org to send to one single address if this was the case? 

0 Kudos
CFECAK
by
Occasional Contributor

We did discuss the group, but with it changing constantly we may just use firefox.

0 Kudos