0 votes
1 view
in RPA by (12.8k points)

I am reading the incoming mails from an outlook mailbox using automation anywhere Email Automation - Get All Messages menu. My simple code is given below. But every time I am getting HTML objects and tags printing in the message box, I want only the email message.

Start Loop "Each message on server:outlook.office.365.com,User Name:[email protected],SSL Server Type:POP3,Message Format:Plain Text"

    Message Box:"$Email Message$"

Can anyone help????

closed

1 Answer

0 votes
by (29.8k points)
selected by
 
Best answer

In your original Email Automation - Get All Messages command, there should be a "Message Format" option below port number.If not - you could offload to a javascript script that might look like this and call it via Run Script:


function noTags(vString) {
    return vString.replace(/<(.|\n)*?>/g, '');
}

Passing vString into it and getting vString back out, now without the tags.

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...