# Working with Email Messages {{< alert style="info" >}}This feature is supported by version 18.2 or greater.{{< /alert >}} ## Working with Email Messages GroupDocs.Assembly allows you to use data bands in table rows in **Email Messages** with HTML and RTF bodies. A table-row data band is a data band whose body occupies single or multiple rows of a single document table. The body of such a band starts at the beginning of the first occupied row and ends at the end of the last occupied row as follows. The syntax for using data bands in email messages is as follows: | **Client** | **Manager** | **Contract Price** | | ---------------------------------------- | ------------------- | ------------------------------------------- | | **<> <<[c.Client]>>** | **<<[c.Manager]>>** | **<<[c.Contact_Price]>> <<foreach>>** | ### Working with Table-Row Conditional Blocks You can also use a table-row conditional block whose body occupies single or multiple rows of a single document table. The body of such a block (as well as the body of its every template option) starts at the beginning of the first occupied row and ends at the end of the last occupied row as follows:

 

 

 

<<if ...>> ...

...

...

...

...

...

<<elseif ...>> ...

...

...

...

...

...

<<else>> ...

...

...

...

...

...

...

...

... <</if>>

 

 

 


{{< alert style="info" >}}The code uses some of the objects defined in [The Business Layer](https://docs.groupdocs.com/assembly/java/the-business-layer/).{{< /alert >}} ### Download #### Data Source Document * [Managers Data.xlsx](https://github.com/groupdocs-assembly/GroupDocs.Assembly-for-Java/blob/master/Examples/GroupDocs.Assembly.Examples.Java/Data/Data%20Sources/Excel%20DataSource/Contracts%20Data.xlsx) #### Template * [Working with Table Row Data Bands.msg](https://github.com/groupdocs-assembly/GroupDocs.Assembly-for-Java/blob/master/Examples/GroupDocs.Assembly.Examples.Java/Data/Storage/Email%20Templates/Working%20With%20Table%20Row%20Data%20Bands.msg) ### The Code {{< gist GroupDocsGists 532bfbe19af4f2bb74f2ef236bc3a822 >}}