Remove attachment from the email and save the email

Hello Everyone,

I want to save the email from the outlook after removing all the attachment present in the email before saving the email in the local drive in the .eml format.

Kindly let me know if we have any property where we can remove the attachment before saving the same or how to perform this step.

Thanks in advance.

Hi @Binod_Kumar_Biswal

Can you try below to download mail in eml format

"C:\Users\lrtetala\Downloads\"+currentMailMessage.Subject+".eml"

Regards,

Hi @lrtetala ,

Thanks for your help but I don’t want to simply save the mail in .eml format before that I want to remove the attachment present in the mail and then I need to save the mail.

@Binod_Kumar_Biswal

Try this

Invoke Code:

mailMessage.Attachments.Clear() ' Clears the attachments from the email

Regards,

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