Jump to content

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.

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.

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 2021-06-05 - Version 1.5.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (NEW 2021-06-14 - Version 1.6.5.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (NEW 2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

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 2021-06-05 - Version 1.5.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (NEW 2021-06-14 - Version 1.6.5.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (NEW 2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...