Email Template Manager Multiple Dynamic Recipients
This is an open discussion with 27 replies, filed under General.
Search
Spontaneously, I don't know what is the expected behaviour in your case. I am not "deep into it".
I want to send the e-mail to both authors. The names are set through a datasource. In this case the e-mail has to be send both to author 'plenaforma' and author 'rudy'.
Both author names are valid and works when I set them normally in the ETM panel, but not when they are set through a text field in a datasource.
As far as I understand, you are trying to send to a comma-separated list of authors which has been saved (as string) to an Input field? Yes, I am afraid that this will not work with ETM.
Using the string in the Recipients field of an email template, ETM will first parse the commas to separate multiple recipient definitions, and afterwards it will parse XPath in those definitions. AFAIK, there is no further logic to parse the values that are found by XPath.
Why don't you use an SBL field to choose the recipients? I think you should be able to use XPath then to send to multiple recipients.
All this is from the top of my head; apologies if something is wrong.
ETM will first parse the commas to separate multiple recipient definitions, and afterwards it will parse XPath
Thanks Michael. I think that is what happens, because I indeed have an hidden input field that contains a string with two or three names seperated with a comma.
I guess I can solve this with a second datasource which contain the recipients and some datasource chaining. Thanks again you got me on the track back.
I hope that you can make it work. If not, try and debug what happens by adding var_dump
statements to the ETM code. You can also write parameters to a log file, e.g.:
file_put_contents('/path/to/symphony/workspace/debug.txt', var_export($your_parameter, TRUE));
or append to a log file:
file_put_contents('/path/to/symphony/workspace/debug.txt',var_export($your_parameter, TRUE),FILE_APPEND);
An extra datasource did the trick. Solved!
Great to hear that!
Create an account or sign in to comment.
Always forget to look in the log :-)
It looks like that the string is treated as one user