I am stuck in mail activity i need to read the body of the mail and extract the name of stocks from it

hey i am working on a email activity when ever i will receive an email it will contain stocks name in i want to extract the name of stock from the mail body and then save that in a variable so that i can search that same stock details on google

1 Like

Where exactly you are stuck ? Can you show the body of the mail ?

1 Like

i am unable to extract the content of the mail (body)

1 Like

Hey Manoj,

please Refer this thread

Regards
Aditya

1 Like

please add that thread

1 Like

for each myMail in mails
myMail.Sender.ToString + " - " + myMail.Subject.ToString + " - " + myMail.Body.ToString

1 Like
1 Like

@skini76 this is reply type that i will get please check the pic : com-2019-02-08-12-19-41

1 Like

Let me know, if not solved

you need to do string manipulation work once you got Mail body

Regards
Aditya

1 Like


i am getting this error while extracting the mail body in assign activity

bodymessage is a generic type variable that is been assigned to Mail.Sender.ToString + " - " + Mail.Subject.ToString + " - " + Mail.Body.ToString

@aditya.prakash @skini76

1 Like

you need to specify System.Net.Mail.MailMessage in for loop type argument as below

image

it will resolved

1 Like

its already set up @aditya.prakash

1 Like

would you share your workflow, if not confidential

1 Like

inside Assign Activity

you have have written Mail.Sender

you need to write mail.Sender

because in for each loop the variable is mail not Mail

1 Like

tried that as well showing error

1 Like

plzz check msg

1 Like

Hi @manoj2500,

You can troubleshoot this by adding individual ‘writeline’ activities for subject, sender and mail body.
In this case mail.Subject , mail.From.Address and mail.body . If you are getting mail subject and mail address, but not mail body, then your mail may be in html format. if so please refer this post.

Warm regards,
Nimin

1 Like

You can refer my source, I am reading mails from outlook & taking actions based on the subject

Mail.xaml (11 KB)

1 Like

i am concerned about the body part as i need to extract the body part of mail

1 Like

@nimin mail.Subject is working but the mail.body is not working
i am only able to extract the subject but when it comes to the body part message box is blank

1 Like