Variable type mismatch

To get IMAP mail messages i saved those messages in a variable of type System.Collections,Generic.List(System.Net.Mail.MailMessage)
But when I’m trying to save the mail message using the same variable then it shows error "value of System.Collections,Generic.List (Of System.Net.Mail.MailMessage) can’t be converted to System.Net.Mail.MailMessage
(No error is shown in the Get IMAP Mail container but error pops up in the container related to saving mail message)

Please give me some suggestions on how to solve this problem

hope your processing via foreach loop
the variabel which store the mail is in list .So while processing through foreach loop it should item by item
please change the variable type to "System.Net.Mail.MailMessage"

Have a look. I have to complete the body part of foreach.

looks like you got me wrong. :stuck_out_tongue:
Keep your "get IMAP message output variable (eg: mail) type as List of System.Net.Mail.MailMessage

when you pass the same variable (eg:mail) in foreach just change the TypeArgument as “System.Net.Mail.MailMessage” keep default item as it is.

please see the screen shot.

Can you tell me how to save a mail or an attachment? I am facing problems in item.Body.Contains("") part. What should I write in the quotes?

we have save attachment and Save Mail Message activity

if you want to save attachment depends on subject or sender name or any condition for eg.

Why did you take the assignment block?

that’s for further operation on attachment so i can read the excel files from the file path.
Anyway that not required in your case .

It’s not working. The attachment doesn’t get downloaded, nor the further sequence gets executed.

whats the error? attach workflow.

There isn’t any sort of error.

after condition does it entering into “then” sequence ?
if not make sure your subject is right. just change subject as “document_Sana”

Nothing seems to work I’m afraid. I’m stuck with this.

:thinking: does your Get IMAP Mail Messaging reading the mail?

It just opens up the page and nothing else

by default “OnlyUnReadMessages” checked .
please keep some unread mail in gmail and try again.

What should be the variable type of password?

its just a string

Still not working. Should I leave this and try other samples?

sure. I don’t know why you unable to do so.:frowning:
All the best.