cancel
Showing results for 
Search instead for 
Did you mean: 

Utility - SMTP email - send message with reference to data items

Rhian.Lowe
Level 4

HI.

I need some help configuring the properties for the SMTP send message action please. Usually I use the send exception email action but I'm a little stuck now.

  1. How do I get it to use the HTML email template I have created?
  2. How do I get it to insert the data fields from the collection I want?

This is my action properties so far:

35890.png

The Data.Submitter Email works.

Where do I put the email template path?

This is the HTML email template... How do I write it so it inserts the data fields?

35891.png

Many Thanks in advanced :)

Rhian

6 REPLIES 6

Hi Rhian,

You can  insert HTML in calculation stage 

Ex1:  If you are trying to insert "Hello world" as html:
In calculation  it should be some thing like this

Calculation stage-  "<html><body><p>Hello world</p></body></html>"
Ex2: Hello world - <Dynamic value from Collection or text>
Calculation stage-  "<html><body><p>Hello world"&[dynmaic text here]&"</p></body></html>"

Refer below some of the threads which has implemented html:

https://community.blueprism.com/communities/community-home/digestviewer/view-question?ContributedContentKey=df3632c1-874b-45a6-a22f-5c492ed1f28c&CommunityKey=1be7947a-bc2f-4974-bb0a-6347e1a324f8

https://community.blueprism.com/question/search-for-vb-script-for-converting-collection-as-html-table#aab921c2-cf97-43b4-98d8-0189ad464c45

-----------------------
If I answered your query. Please mark it as the Best Answer

Harish Mogulluri

1. Use a referenced data item in the body field with HTML and CSS structure.

 <style>
        table {
            border-collapse: collapse;
            width: 100%;
        }
        th, td {
            border: 1px solid #ccc;
            padding: 8px;
            text-align: left;
        }
    </style>
</head>
<body>
    <table>
        <tr>
            <th>Nome</th>
            <th>Email</th>
        </tr>
 
    </table>
2. You'll need to create a table structure using HTML and a loop. There are various ways to do this, but I find that using a base HTML and performing row-wise validation is the most commonly used approach.
Regards,
Leonardo Soares RPA Developer América/Brazil

Rhian.Lowe
Level 4

Hi.

Thanks for the help. I've managed to write it into the body of action but I am getting an exception. It doesn't like the "<br>" and bold actions. 

How to I write these in the expression please?

BW Rhian

Babjee24
Level 7

Hi Rhian,

Please share the HTML body that you have tried creating, looking at it might help us in identifying the issue.

Babjee Vangipurapu
Senior RPA Developer
India

Rhian.Lowe
Level 4

Hi. 

This is the body. It's pulling the text and data fields fine.

35887.png

Babjee24
Level 7

Hi Rhian,

Attaching the screenshots of the test body that I've created and the corresponding email for the body I go for your reference. This code snippet is working fine for me, bold and line breaks are working as expected. As I can see from the screenshot that you've shared please make use of </br> instead of <br> also you need not use "&&" before every HTML tag. "&&" this is used to attach a variable to text

35888.png

35889.png

I hope this helps...

Babjee Vangipurapu
Senior RPA Developer
India