Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Send Mail function

Featured Replies

Hello

I am using the Send Mail function to try to generate an email with multiple addressees in the "To" field.

However, whether I use hard-coded email addresses or variables, the Calculation engine just seems to pick up the last email address in the Case statement and not all of them.

Please see below example. Any ideas?

Paul

Case (

$recordCount = "1"; "[email protected]";

$recordCount = "2"; "[email protected]; " & "[email protected]";

$recordCount = "3"; "[email protected]; " & "[email protected]; " & "[email protected]"

)

First why is your number is your variable a text string?

Second, what exactly are you trying to achieve here. Waht you are trying to do seems to be going down the wrong path...

Post back with what you are trying to achieve, not the way you are doing it now and I am more than sure that we can poitn you in the right direction.

  • Author

My variable ($recordCount) is a text, but since I am not adding/subtracting it doesn't really matter.

I am trying to send an email to individuals associated with specific budgets when the budget is approved. The number of individuals in the email will range from 1 - 4 people, depending on the budget.

Before I get to the Send Mail aspect of the overall script, I am getting the email addresses of the individuals associated with the budget and putting them in local variables (though not reflected in the example below).

My intent was then to populate the email addresses from the variables into the "To" field of the email with the Case function and another variable ($recordCount) that lets me know how many addresses (1 -4 )there will be in the "To" field.

I am still not understanding...

You should only have one variable that has all the collected email addresses in it.

Also to count how many addresses there are, you should be able to do a simple. PatternCount ( $address; "@" )

  • Author

I tried putting all the email addresses in one variable--it still doesn't work.

The "To" email field does not seem to accept more than 1 email address no matter how I have done it.

If your SendMail to field references the variable then it should work fine.

Send Mail [ to: $address ]

I believe that something in your script is not setting the variable correctly. Since you have Advanced, step through debugger with the data viewer on and see what value the variable has at the point that it is set.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.