I want to read in all emails from my mail account, and save every email in its .eml format in a column of a csv. So every row should contain the .eml output in textual form.
How can I do this?
I want to read in all emails from my mail account, and save every email in its .eml format in a column of a csv. So every row should contain the .eml output in textual form.
How can I do this?
Thank you for your response. However, this is not what I’m searching for. I want to have something like this (imagine this is an excel file with 1 column called “emails”):
emails
email1.eml as string
email2.eml as string
email3.eml as string
…
So I want to have the output of the “Save Mail Message” activity, but I want to save it as a string, and moreover want to save it for every email. The problem with this activity is that you only do this for 1 specific mail, so if you use a “for each” activity" around this, it simply overwrites the file every time a new email is saved.
You can count the total of your csv row and if you want to insert data just pass the count plus 1 so that you will not overwrite the previous value @Niels1
cheers
Happy learning
Ok so how can I do this concretely? Currently I do this:
Hi @Niels1
I already share to you the article how you can save the email sa eml file and save anywhere you want and do your desire thing.
cheers
Happy learning
Yes I understand how I can save an email as an .eml file. But this activity only allows me to provide a file path. I don’t want to save it to a file, I want to save it as a row in a data table, and moreover, I want to do this for every email.
Then after you save it to a row you want to save it to csv file or excel file am i correct ?
@Niels1
I figured it out. What I do is, for every email (which is a MailMessage object), I save it to a txt file using the “Save Mail Message” activity, and then use the “Read Text File” activity to read the content of that file again and save it as a String variable. Then, I can add it to the DataTable using the “Add Data Row” activity (with ArrayRow = {this String variable}).
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.