Can i convert system net mailmessage to string

Hello friends, I want to save my email subject to notepad but when I am using write text file here showing system.net.mailmessage to not convert into the string. Below check screenshot

.

@Vikram_Singh I think you need to take the Subject from the MailMessage Variable first, then you can output the Subject to the Write Text File

@Vikram_Singh

You can write display.Subject.ToString in that write file

Still Not saved unread mail subject in text file.

sorry friend not showing all subject in text file

Hi
Hope these sequence would help you resolve this
—once after getting the mail list from GET OUTLOOK MAIL ACTIVITY with a variable named list_mails use a FOR EACH activity and mention the variable list_mails as input
—change the type argument as System.Net.mail.mailmessage in the for each activity
—inside the loop use a WRITE TEXT FILE activity
Where mention the input as item.Subject.ToString and file path as
“Yourfolderpath\”+”Mail”+”_”+counter.ToString+”.txt”
Where counter is a int32 variable with default value as 0 defined in the variable panel

—next to this Write text file activity inside the loop use a assign activity like this
counter = counter + 1

Kindly try this and let know for any queries or clarification
Cheers @Vikram_Singh

3 Likes

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