Get Mail message and attach each line to strings

Hello,

I am making a process regarding getting mail messages.
Each line the email contains different information.
How do I attach each of the lines to different string variables?

@dvn If the Information in the Email is in the Body, Then Suppose ListOfMsgs is your Output of Get Mail Messages. Follow these Steps :

  1. For Each item of ListOfMsgs, Set Type Argument as Mail Message

  2. Inside For Each, Use an Assign Activity, say StrArray = Split(item.Body.ToString,Environment.NewLine)

  3. All the Lines in the Email Body are Stored Separately, in each index of StrArray.

StrArray is Of the type Array of Strings.

4 Likes

thank you very much for the reply and this has helped me very much.

But lets say I only want the first line assigned to a certain string, how would i do that?

@dvn So you want only the First line of Each message Assigned to a String varible?

@dvn Can you Check this Workflow and Try to implement it in your Workflow the Same, If any Doubts ,Please Ask :
Main.xaml (7.1 KB)

1 Like