Move Outlook Mail

Hi all, I want to move an outlook mail to a specific folder but the mail message is in string therefore I got the error: "Value of type string cannot be converted to system.mail.mail message.
Please how do I convert the string message format(text file) to system.mail.mail message

Hi
— use a get outlook mail activity and get the output with a variable of type list of mail messages
— use a for each loop and pass the above variable as a input and change the type argument as mailmessages
— inside the loop use a save mailmessage activity and pass the input variable for mailmessage as item and the folder path where you want to save in the property filepath

Hope this would help you
For. More insights

Cheers @stanstilo

Hi palaniyappan, I used the output from the getoutlook mail message as the input in the for each loop item but the error “cannot convert from list<system.net.mailmessage> to system.net.mailmessage” was displayed

Fine
We only need to mention as System.net.mail.mailmessages
Cheers @stanstilo

image
The output for the getoutlook is having the variable type <list system.net.mail.mailmessages so entering it as input to the save mail message gave the error “cannot be converted to system.net.mail.mailmessages”

Fine
here we need to mention as item as it holds the value of mail message output variable now
image

Cheers @stanstilo

1 Like

Cheers Palaniyappan, but I didn’t get the saved mail in my created folder

–kindly check whether onlyunreadmails property is enabled in the get outlook mail activity
and if so we need to have atlest one unread mail
Cheers @stanstilo

1 Like

Hi Palaniyappan, it worked, I have a user registration database where new users are updated each user id has a button inline.How do I make the click button dynamic so that whenever a new user registers it can be able to click on the new users button not only a particular user

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.