hassam36 Posted April 10, 2008 Posted April 10, 2008 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]" )
mr_vodka Posted April 10, 2008 Posted April 10, 2008 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.
hassam36 Posted April 10, 2008 Author Posted April 10, 2008 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.
mr_vodka Posted April 10, 2008 Posted April 10, 2008 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; "@" )
hassam36 Posted April 10, 2008 Author Posted April 10, 2008 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.
mr_vodka Posted April 10, 2008 Posted April 10, 2008 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.
Recommended Posts
This topic is 6131 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now