Solved Send email with HTML table

rpaccount

Member
I'm using Outlook VBO
Created instance and using send email action
I need to send an email with a table that consist of values in the collection.

Here's an example of my collection
Column1 | Column2
---------------------
ABCDE | ABCDE
ABCSS | ABCDE
ABCAA | ABCDE

I'm using calculation stage to do this. This is my HTML code.

"<table>" &
"<tr><th>Column1</th>" &
"<th>Column2</th></tr>"

& Chr(10) & Chr(10) &

"<tr><td>" & [Collection.Column1] & "</td>" &
"<td>" & [Collection.Column2] & "</td></tr>"

& NewLine() &

"</table>"

When i put it in a loop, the first row is overwritten by the second row of the collection.
In the end, i only have 1 row of value even though i have 3 rows

Does anyone knows how to get all values in a collection in a table?

Thanks!
 

VJR

Well-Known Member
Hi rpaccount,

The process diagram to generate the html table would look something like this-

Process Diagram:
Loop on the Collection. Initially the 'Main Body' data item would empty.

View attachment 1530588470634.png


Append Collection Rows to Table:

View attachment 1530588511783.png


Generate Final Body:

Append the Table Header (with column headings) + [Main Body] + Table Footer.
The [Main Body] is already generated in the above step.

View attachment 1530588561333.png


Final Output:

View attachment 1530588765690.png
 

VJR

Well-Known Member
Hi rajak,

Are your requirements and input data exactly the same as the original poster here. If not please post the complete details of what is the requirement, what have you done so far and what are the issue details.

Also do elaborate what you meant as "not able to find out the result". Have you enabled HTML in the email action? Are you using MapiEx or Pop3/SMTP for email action?
 

VLTNSZ

New Member
Dear

I managed to do the HTMl, but MAPIEX only sends Text in the body, is there any other solution?

Estimado

Lo logre hacer el HTMl, pero MAPIEX solo envía Texto en el cuerpo, ¿existe alguna otra solución?
 

VJR

Well-Known Member
You will need to use the MapiEx HTML VBO for Outlook available in the newer BP versions OR for older version check by downloading it from the BP portal, which supports sending Outlook emails with HTML.
Also refer a mention about it in Post #11 here.
 

Lalithkumar

New Member
Hi rpaccount,

The process diagram to generate the html table would look something like this-

Process Diagram:
Loop on the Collection. Initially the 'Main Body' data item would empty.

View attachment 1259


Append Collection Rows to Table:

View attachment 1260


Generate Final Body:

Append the Table Header (with column headings) + [Main Body] + Table Footer.
The [Main Body] is already generated in the above step.

View attachment 1261


Final Output:

View attachment 1262





Hi VJR,

i tried the above code ,am not getting table format instead of that am getting plain text as it is what is there in mail body data item.
can you pleas help me.


thank you
 

mfortunato

New Member
Hi rpaccount,

The process diagram to generate the html table would look something like this-

Process Diagram:
Loop on the Collection. Initially the 'Main Body' data item would empty.

View attachment 1259


Append Collection Rows to Table:

View attachment 1260


Generate Final Body:

Append the Table Header (with column headings) + [Main Body] + Table Footer.
The [Main Body] is already generated in the above step.

View attachment 1261


Final Output:

View attachment 1262


Thanks, it worked for me as well.
 

Attachments

  • HTML.JPG
    136 KB · Views: 394

gayatri

New Member
hi All,
By using this code i am getting values as in format of table but not with any borders.I am usimg email-pop3/smtp vbo.
Could you please help me on this
 

Calum

New Member
Hi @gayatri ,

Try to use inline css in the HTML code. which will add border to your table.

I hope it will help you..!

Hi Sachin,

Could you please advise on how to add the inline css to add a border?

I have created a small test process using the information from this thread, however I am struggling to understand what/where to put the css html code.

Many thanks
 

Attachments

  • Process.PNG
    55.5 KB · Views: 172
  • Append.PNG
    90.6 KB · Views: 136
  • Generate.PNG
    44.5 KB · Views: 118
  • Output.PNG
    18.4 KB · Views: 115
Top