Ask a Question

.msg (email) validation / parsing

ChrisPerth
Occasional Contributor

.msg (email) validation / parsing

Hi Smiley Happy

 

Has anyone found a solution to verify/parse .msg files without having to go through outlook?

Preferably in Javascript or C# Script if possible.

 

Out test environment outputs email to .msg format to a directory and I want to validate the contents of the email without having to go via outlook.

Been searching for a solution on google without any success Smiley Sad

Any advice is appreciated, thanks.

7 REPLIES 7
shankar_r
Community Hero

There is an open source library to parse .msg file, which you can find here

https://github.com/ykarpovich/msg.reader

 

 

you can use this lib by using javaclasses option in testcomplete

https://support.smartbear.com/testcomplete/docs/testing-with/advanced/using-external-functions/calli...


Thanks
Shankar R

LinkedIn | CG-VAK Software | Bitbucket | shankarr.75@gmail.com

“You must expect great things from you, before you can do them”

Extension Available

ChrisPerth
Occasional Contributor

Hi Shankar R,

 

Thanks for the reply.

I did find ykarpovich/msg.reader but did not have much success running it in TC without completely hacking it up.

 

The second link you posted is in reference to Java and not JavaScript.

Am I missing something?

 

Cheers,

Chris.

The second link shoes you how to integrate with java Lib into TestComplete

 

I guess instead of seeing ykarpovich/msg.reader you can try https://stackoverflow.com/questions/65936/whats-the-best-library-for-reading-outlook-msg-files-in-ja...


Thanks
Shankar R

LinkedIn | CG-VAK Software | Bitbucket | shankarr.75@gmail.com

“You must expect great things from you, before you can do them”

Extension Available

ChrisPerth
Occasional Contributor

I don't think you have read my reply in full.

I am not after a 'Java' solution. JavaScript and Java are very different.

 

How is JavaScript different from Java?

https://www.java.com/en/download/faq/java_javascript.xml

 

I am pretty much good at differentiating JavaScript and Java.

 

I was trying say, there is not much with JavaScript to achieve your scenario.

 

That's why I'm suggesting you to checkout the java libs to try your scenario.

 

 


Thanks
Shankar R

LinkedIn | CG-VAK Software | Bitbucket | shankarr.75@gmail.com

“You must expect great things from you, before you can do them”

Extension Available


@ChrisPerth wrote:

I don't think you have read my reply in full.

I am not after a 'Java' solution. JavaScript and Java are very different.

 

How is JavaScript different from Java?

https://www.java.com/en/download/faq/java_javascript.xml

 


What @shankar_r is indicating is that you can take a Java lib and have TestComplete consume that lib for use within your automation.  This is a standard practice for many situations where TestComplete may not have the built in capabilities but you can import those capabilities from outside sources.  A common example is the use of PDFBox to be able to consume and parse PDF files.  Sure, you could probably write the code from scratch using JavaScript... but why, when there are consumable libraries out there that allow you to do so?  That's what this link (https://support.smartbear.com/testcomplete/docs/testing-with/advanced/using-external-functions/calli...) is all about... taking an external Java lib, importing it into TestComplete, and then calling functions from that lib within your automation.

Give it a try... I'm guessing tht it will do EXACTLY what you want it to.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
ChrisPerth
Occasional Contributor

Ok, thanks for your feedback.

 

I will look into it further Smiley Happy

cancel
Showing results for 
Search instead for 
Did you mean: