Inserting multiple, dynamic html content in emails

Hello,


I am sending, with html/css customized, emails with my application. The customization worked out fine, but my problem is that I have to include a new sector for each tuple of my entity. 


To clarify: My application commits multiple variables (like name, telephone number) to an web aplication which then sends my emails. In each email should be every person displayed. So each sector looks kind of the same but with different variable values. 


Please find an example attached. I have marked the first and second section. The first one looks just fine and I would like to know how to attach multiple sections to the same email.


Does somebody know how I can re-use my customized mail as often as there are tuples in my entity and display it underneath the last section? 

example2.PNG

Hi Lars,

I'm assuming your email is created under a traditional web module. You can have in your preparation action a query which gets the list of employees with all their details you described, name, telephone number, picture, etc. and feed a List Records widget. Inside it, you can put a created web block which is your form seen in the picture attached with the same css layout. For each element in your list, that web block is going to be re-drawn.

I think this could be a way to solve your issue.

Tiago

you can use a list in email, just like you can in a web application.

The only tricky part is to get the format/layout right. Not all HTML works in email is my personal experience.


Thank you for your fast reply. I'll try this tomorrow, so I haven't started to get into this.


So you would use a List Records widget, right? What Source Record List would you recommend to use then? I don't get what to fill in there to be honest.

Yes, if you need to repeat some data, thats a list.

You have more than 1 person html, tuple you call it?

You need to put that in the list.


Just try to think: how would you do it in a webform?

Hi Lars,

I'm assuming your email is created under a traditional web module. You can have in your preparation action a query which gets the list of employees with all their details you described, name, telephone number, picture, etc. and feed a List Records widget. Inside it, you can put a created web block which is your form seen in the picture attached with the same css layout. For each element in your list, that web block is going to be re-drawn.

I think this could be a way to solve your issue.

Tiago

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.