You need to sign in to do that
Don't have an account?
bryano
Sending to mutiple emails with Flex toolkit
I'm trying to send email to muliple addresses using the Flex toolkit and I can't seem to get it to work. I'm able to send to a single email addresses.
I've tried passing the following to the "toAddresses" property of the SingleEmailMessage object:
1. a comma seperated string i.e. "foo@bar.com,abc@xyz.com"
2. an array
When I try to pass an array, Flex gives a compliation error, stating "toAddresses" is expecting a String.
Any ideas?
I've tried passing the following to the "toAddresses" property of the SingleEmailMessage object:
1. a comma seperated string i.e. "foo@bar.com,abc@xyz.com"
2. an array
When I try to pass an array, Flex gives a compliation error, stating "toAddresses" is expecting a String.
Any ideas?
Well, it appears that you found a bug in the sendEMail function in the flex toolkit. The address fields (to, bcc, cc) should all be string arrays. The SingleEmailMessage defined those fields as strings. I have fixed and tested this issue.
To temporarily work around the issue until we publish a new cut of the toolkit, you can create a new SingleEmailMessage class that has the correct address type definitions. I've created one below that you can use in your project.
Code:
Below is a sample of using this class instead of the SingelEmailMessage class:
Code:
We will post in the Ajax Toolkit & SControls board when the fix is publicly available.
Cheers.