324
Views
7
Comments
Solved
Get the contents of outlook mails in outsystems
Question
Application Type
Reactive

I want the contents of the outlook email which contains multiple files like excel and ppt. i upload this email through form in .msg format.

I stored the email in local variable.But after that what I have to do to retrieve the files?

can anyone help me with this?

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP
Solution

Not if you just have the msg files. If you receive the mails in a mailbox, then it depends on type of mailbox how you can extract them. For example, if you have an Office 365 mailbox, you can use the Microsoft Graph API to query the mails and extract the attachments. There are various Forge assets (e.g. this one), that can help you with that.

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Sowndhar,

Unfortunately, you can't. msg files are in a properietary Microsoft Outlook format, you can't process them. If you want to process e-mails you can either store them in richmail format (Outlook saves these as mht files), in which case you could try to parse them (since they're text-based), or store the e-mails in a mailbox and use a mail API to retrieve them.

UserImage.jpg
Sowndhar S

Oh Ok @Kilian Hekhuis ,Is there any way to save attachments of the sending mail ?

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP
Solution

Not if you just have the msg files. If you receive the mails in a mailbox, then it depends on type of mailbox how you can extract them. For example, if you have an Office 365 mailbox, you can use the Microsoft Graph API to query the mails and extract the attachments. There are various Forge assets (e.g. this one), that can help you with that.

UserImage.jpg
Alexandre Yip

Hi Sowndhar S, 

The bellow component allows you to extract the attachments given the email binary content. 

Have a look on it. 

https://www.outsystems.com/forge/component-overview/6358/emailutils

Hope that it helps you, 

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Alexandre,

That wouldn't help, because as the component description clearly states, it works only for MIME format. Sowndhar was looking for msg files, which are in Outlook format.

UserImage.jpg
Sowndhar S

Thanks @Alexandre Yip .

As Kilian said,I am looking for .msg format.I saw one module "OverlyAttached" ,this may be useful in this case.

https://www.outsystems.com/forge/component-overview/4100/overlyattached

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

That's an interesting one, and by the looks of it does what you want. It's an old component though, so if it doesn't work let me know, perhaps I can interest Armando (also an MVP) to update it.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.