Hi, I am reading an email body but it’s not reading.
Buddy @balkishan
What was the syntax you were using buddy
to get the mail body from the mailmessage variable obtained from any get mail activity
this should be the syntax buddy being inside the for each loop with mailmessage list as input to it
item.body.ToString
this would give the body of the mail buddy
Cheers @balkishan
In For each loop ,argument type should be System.net.Mailmessage.
No, bro. since it’s a html body. so Mail.Headers(“PlainText”) worked!
How can I reads the yellow highlighted color text. since it’s a dynamic bro
you can do like this buddy, whether it is approved or rejected
once you get the plaintext form Mail.Headers(“PlainText”) assign it a variable like this
out_plaintext_array = plaintext.Split(Environment,Newline.ToArray())
where out_plaintext_array will be of array string type
–then use a for each loop with out_plaintext_array as input and type argument as string
and inside the for each loop use a if condition like this
item.Contains(“Approved”)
if the mail has the word Approved this condition will get passed and you can proceed further with the other activities in THEN part of if condition or with ELSE part of if condition
thats all buddy
Cheers @balkishan
@balkishan did that work buddy
@Palaniyappan can you see bro
Hi @balkishan.
Please try
item.Headers(“HTMLBODY”).ToString
Buddy @balkishan
You were almost right
Its
Environment.Newline.ToArray()
Remove the space and comma between Environment and Newline buddy…
Cheers
Thanks to @Palaniyappan @Jan_Brian_Despi and @aksh1yadav for your response
Cheers buddy @balkishan
Keep going
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.