Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in RPA by (12.7k 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.5k 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.

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...