Home > Forum > Actions > Multiple customized e-mails from a item-list

Multiple customized e-mails from a item-list
0

MVP

I have the scenario, where i keep e-mail address and other informations in an itemlist.
Now i need to send e-mails for each recipient in the itemlist. The e-mail contains informations from other columns in this list.
By having three entries in the itemlist, there would be three e-mails with different content to be sent.

Currently i'm thinking about creating a simple workflow to send an e-mail. The workflows would be started with the "Start a subworkflow (SQL)" action based on the itemlist content.

Are there other/better approaches to solve this scenario?

MVP

Hi Markus,

I would use the same approach. In the majority of cases when I have to do something per item list I do this in a subworkflow.

If you don't want this the only other option I see is creating a loop:

a) Path send mails -> moves to flow control "More mails to send"
b) Check whether there is an item list row with flag "Mail send" = true
c) If true, execute custom mail action which uses a Business Rule to retrieve the first row (TOP 1) with flag "Mail send" = false", similar for the content. Set "Mail send" to true.
d) If false go to the next step.

I'm not sure though, whether c) can lead to the flow control. It could be the case, that it creates an endless loop because the "Mail send" is set in another transaction and is not available yet. If it's an endless loop, you could move it to another step, with a timeout action with interval "immediate" to move it back to the flow control.

Hm, I don't like the approach. :)

Best regards,
Daniel