Creating table in Email Body
Hi, I am using Email Template module to send email in my application. I want to know if Mendix supports ‘table’ in the body of the email. If possible, then how can we create one? Thanks, Anjali
Yes, you can set the HTML body of your e-mail and include tables.
- I assume you can add tables having static text using the CKEditor
- Some simple tables you could model yourself using the HTML-tags <table><tr><th><td> etc.
- For more extensive tables you could make use of the document template functionality of Mendix:
- Create a Document Template and fill this according your needs (Mendix native functionality)
- In the microflow sending the e-mail, call the Generate Document action and put the html-output in your HTML body of your e-mail
Hopefully this helps!
There was another recent Forum question about how to do this. Here is how I’ve done it in one of my apps:
The overall microflow:
Beginning of the table
Adding one row in the table
Finishing the table
Once I’ve done this, the email is sent with an HTML body and the table appears in the email like this
There may be a more elegant way to do this, but this method works.
Hope that helps,