Jump to content
Sign in to follow this  
Juvigy

Outlook - How to determine mail language

Recommended Posts

I have a PST which is an archive from an General Mailbox. Inside there are different types of mails in different languages:

Some are HTML other TEXT , some in English other in French and German. I would like to be able to programatically tell in which language is the mail. Any idea how this can be done?

PS. I am fairly familiar with the outlook UDFs and MSDN Outlook object reference.

Share this post


Link to post
Share on other sites

As I see it, not really a question related to AutoIT specifically but for programming in general. And a hard one too, as "language" is a soft parameter which is hard to analyze.

This page has some suggestions. One of them being detectlanguage.com - the API seems to be free to use.

For no API use, perhaps you have distinct words you can search for ?

Not much of a solution, just some general pointers. Hope they're helpful to you.


I am just a hobby programmer, and nothing great to publish right now.

Share this post


Link to post
Share on other sites

Give function _OL_MailHeaderget a try.

In the example I have run here I get

...

"Accept-Language: de-DE, de-AT, en-US"

"Content-language: de-DE"

...

for a mail written in german.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2019-08-19 - Version 1.4.13.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-07-24 - Version 1.3.6.0) - Download - General Help & Support - Example Scripts - Wiki
Outlook Tools (NEW 2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Task Scheduler (NEW 2019-10-09 - Version 0.9.0.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Doesnt work for most of my mails - If there is some english - for example in the signiture it says it is English and not Deutch.

Share this post


Link to post
Share on other sites

Looks like that is the only automated information Outlook provides. But how would you determine the language of a mixed mail?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2019-08-19 - Version 1.4.13.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-07-24 - Version 1.3.6.0) - Download - General Help & Support - Example Scripts - Wiki
Outlook Tools (NEW 2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Task Scheduler (NEW 2019-10-09 - Version 0.9.0.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

I am thinking of getting the mail body only and checking 10% of the words against a dictionary or something.

I am still thinking about it.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...