If the image is there in the mail body, it should have been added as html body
so while fetching the mail with GET EXCHANGE mail activity make sure that you have enabled ISBODYHTML so that only the mail with html enabled or included will be taken and gives us the list of mailmessges.
Then use FOR EACH activity to iterate through each mailmessage and inside the loop use a IF condition like this
item.Body.ToString.Contains(".png") or item.Body.ToString.Contains(".jpg")
this will check whether the mail html body has IMAGE in it or not, because so far we have checked only the html first but that doesnt mean whether it could be a html table or a image along the mail body. This will validate whether its a image or not.
if you are not using GET EXCHANGE mail activity and using normal mail activity,
it wont have ISBODYHTML property.
so to validate whether the mail body has html tags in it or not then get the list of mailmessage as a variable
then use a FOR EACH activity and pass the above variable and inside the loop use a ASSIGN activity
str_encodingName = item.BodyEncoding.EncodingName
this will give us a encoding name as “utf-8”
–use a IF condition and check whether the str_EncodingName has utf-8 in it or if its a plain text then it will have as “us-ascii”
–if the condition is true it will go to THEN part where use another IF condition and as said in the previous method use .png as condition and check whether it is a image along mail body or not
–Then we could save the mail message with SAVE MAIL MESSAGE activity
hope this would help you