Save email attachments in a folder name with subject and email data and time

Hi,

I have to download attachments from email and store in a folder,folder name should subject,Date time of email.

and if email has Zip file it should also get extracted in the same folder.

Regards,
Heena

@heena_shaikh

Use Save Attachments activity to save Attachments.

@lakshman but how to save in a folder naming with subject and date of email

@heena_shaikh

For subject - mailMessage.Subject
For Date - mailMessage.Headers(“Date”)

Where mailMessage is of type System.Net.Mail.MailMessage.

1 Like

@lakshman

Can you help me to understand what mistake i am doing.

I am getting the below error.

Create directory: The given path’s format is not supported.

MailMesage _Saveto_folder.xaml (9.4 KB)

@heena_shaikh

Could you show me screenshot of how you specified path. So that I can check and let you know what went wrong.

i am tryiing to create a folder with mail subject and date

@heena_shaikh

Is the subject contains any special characters ? I guess may be because of that it’s giving error. Try to print the entire path and check it once.

@lakshman i tried with the subject having no special characters still the error persist

@heena_shaikh

Could you please print that path and show me screenshot of it.

@lakshman Thank you so much for all your efforts . . …i have managed to get the desired output :slightly_smiling_face:

1 Like

Great @heena_shaikh