Dynamic html table in Send Mail attachment

I want to create an HTML table that can be updated for example now it has 4 rows but after the update, it can be 5 rows. so how i can generate html table ?

You should work in a datatable until you have all rows ready, hwn you finish then you create some code to append strings like "<Table><th>...." + </table>" and then write in your email body…