Bulleted List in Email Document

Note
In this article, we will use GroupDocs.Assembly to generate a Bulleted List report in Email format.
Note
The example reads the shop data described in The Business Layer.

Bulleted List in Email

Reporting Requirement

As a report developer, you are required to share the following key requirements:

  • A report must be in .eml or .msg format.
  • It must add email recipient, CSS and subject of the email.
  • A report must show all the products in a bulleted list format.

Adding Syntax to be evaluated by GroupDocs.Assembly Engine

Recipients, Cc and Subject
<<foreach [r in recipients]>><<[r]>>; <</foreach>>
<<[cc]>>
<<[subject]>>
Body
We provide support for the following clients:
<<foreach[in products]>>  ∙  <<[ProductName]>>
<</foreach>>
Tip
For detailed technical information about syntax, expressions and report generation by the engine, please visit: Working with GroupDocs.Assembly Engine.

Download Bulleted List Template

Please download the sample Bulleted List document we used in this article:

Generating The Report

import json

from groupdocs.assembly import DataSourceInfo, DocumentAssembler

with open("products.json", encoding="utf-8") as f:
    products = json.load(f)

assembler = DocumentAssembler()
assembler.assemble_document("bulleted-list.msg", "bulleted-list-report.msg", [
    DataSourceInfo(products, "products"),
    DataSourceInfo("Harbor Lane Provisions <orders@harborlane.example>", "sender"),
    DataSourceInfo(["Quayside Bistro <orders@quaysidebistro.example>", "jonas.weber@harborlane.example"], "recipients"),
    DataSourceInfo("amara.osei@harborlane.example", "cc"),
    DataSourceInfo("Bulleted list", "subject"),
])

The following sample file is used in this example: bulleted-list.msg

The following sample file is used in this example: products.json

Binary file (MSG, 52 KB)

Download full output

Close
Loading

Analyzing your prompt, please hold on...

An error occurred while retrieving the results. Please refresh the page and try again.