Send email - Add table extract to outlook email message

Hi EM community,

Is there a way I can paste a table from my EM file to my email body - not as an attachment but a table in the email body itself .

Warm regards,
Shruti

Hi Shruti,

Do you need it to be an HTML table or a plain text table?

Plain text table picked up from my morph

Shruti, here is an example project.

DatasetToPlaintextTable.morph (8.6 KB)

The example’s workflow is as follows:

  • Create a row which column headers and prepend it to the main dataset (works for any dataset)
  • Use the “Calculate new column” action with several padend() functions to create a fixed-width text representation of each row (should be modified manually according to input dataset)
  • Use the “Aggregrate” action to merge all the rows into a single cell with a fixed-width text table
  • Use the “Iterate” action which calls a module that contains the “Send email” action. This way we will be able to insert the generated table to a message body as a parameter.

The project also calculates the maximum length of values in each column. The calculated values
can be taken into account when modifying the expression which creates fixed-width text from rows.

The problem here is that web clients of most of the modern email services (like Gmail or Outlook on the web) will use a proportional font to display plaintext messages. Therefore the table will not be displayed as expected:

image

You can use the “Show original” feature in Gmail to view email text in a monospace font. But it will show you line breaks for longer lines:

image

So it seems that the only workaround for web clients is to use HTML tables.

Also, installed email clients should show fixed-width tables correctly.

Hi Shruti,

now there is a simpler solution to your question. Check out this topic: