How to Handle .MSG Files for Attachment Extraction Without Outlook Pop-ups?

Hello everyone,

I am automating attachment extraction from over 1000 saved emails, which are in both .MSG and .EML formats.
I am using the “Read Saved Email to Object” activity from the UiPath Marketplace, which works well for .EML files.
However, when processing .MSG files, it triggers random pop-ups from Outlook, making automation unreliable.

image

Has anyone faced a similar issue or knows how to either:
popups
image

  1. Convert .MSG files to .EML without opening them, or
  2. Extract attachments from .MSG files directly into a Net.Mail.Message object, bypassing the need to open the file?
  3. the UiPath check aap state activivty fails to identify the popups!!
    Any guidance on handling these .MSG files more effectively would be greatly appreciated!

@Avyan.Sharma

  1. The best way is to disable that pop up for ever by giving programattic access permissions to outlook
  • Open Outlook as Administrator (right click on the Outlook application → Run as Administrator)
  • In top menu bar, click File
  • Click Options
  • Click Trust Center
  • Click Trust Center Settings
  • Click Programmatic Access
  • Select “Never warn me about suspicious activity”
  • Click OK
  1. Extract email subject body attachment from .msg UiPath - RPA Learners

But in both cases I believe outlook is still to be used

Cheers

@Avyan.Sharma,

Follow this solution from Microsoft to prevent this error.

Thanks,
Ashok :slightly_smiling_face:

Hi @ashokkarale thanks for your reply

the process is going to be running on production for external clients.

and we don’t have permission to ask them to change their outlook policies using the outlook settings.

that’s the reason I want to handle the popup or convert the .msg file to.eml file
or download popup without opening .msg files.!!

Hi @Anil_G

thankyou for the reply,

the process is going to be running on production for external clients.

and we don’t have permission to ask them to change their outlook policies using the outlook settings.

that’s the reason I want to handle the popup or convert the .msg file to.eml file
or download popup without opening .msg files!!

please help if possible.

@Avyan.Sharma,

As a prerequisite of automation, you will have to ask the client to do this settings. Through bot you cannot add this logic to handle it.

No other way!

Thanks,
Ashok :slight_smile:

1 Like

@Avyan.Sharma

Msg files are basically outlook files only…so you need it in some or the other way to do this

Cheers

1 Like