PlanetSquires Forums

Support Forums => PlanetSquires Software => Topic started by: Petrus Vorster on June 06, 2023, 08:36:34 AM

Title: Outlook .MSG
Post by: Petrus Vorster on June 06, 2023, 08:36:34 AM
Hi All

I remember when we worked in Powerbasic we spoke about automatically sending messages via Outlook. Never got that working.

I noticed that one can start and open MS Outlook with a shell command to open a .msg file, the same way one would open Excel or Word files as the default program for a file type.

Does anyone know how to structure a .msg file (probably XML) so that Outlook can read and send it?
I made a tool that created a .csv file that the user must manually upload to a Cellphone company website for bulk SMS notices, but they have a function to Email the bundle as well. (also an API to which i don't have access)
SOme users thought it would be great if we could skip the upload part and let Outlook do its thing.

Its about time I move that tool from Powerbasic to Freebasic, but I am not going to fix things that works, unless this is actually possible to do this.

Where would one start with that?

Regards, Peter

Title: Re: Outlook .MSG
Post by: Paul Squires on June 08, 2023, 12:08:09 AM
I haven't seen any FreeBasic or PowerBasic code that creates .msg files. That file format does seem somewhat involved and I imagine it would take a lot of work to build and test to ensure its accuracy. Here is the link to the file format. https://learn.microsoft.com/en-us/openspecs/exchange_server_protocols/ms-oxmsg/b046868c-9fbf-41ae-9ffb-8de2bd4eec82
Not sure you'll find many projects that create these msg files from scratch. I did a quick search and saw one .net library.
Title: Re: Outlook .MSG
Post by: Johan Klassen on June 08, 2023, 08:07:50 PM
hello Petrus Vorster  :)
sorry to hear about your unhappy situation at work, I hope that it either gets better or that you may find a good and satisfying job
regarding your email messages problem, I was thinking that maybe somebody has written a library that would allow you solve your problem without knowing the ins and outs of the msg format, similar to the barcode library.
I found this application that imports and exports msg's to different formats https://www.cubexsoft.com/msg/
my thought was that it's easy enough to make a rich text document which then could be exported to msg, the prices seem reasonable to me https://www.cubexsoft.com/msg/purchase.html
but I don't know whether you could automate the chore with programming or not
Title: Re: Outlook .MSG
Post by: Petrus Vorster on June 09, 2023, 05:20:00 AM
Hi Johan

No, the MSg idea is not important. It was just a thought.
I am not going to dig into that.

The Barcodes were somewhat of a challenge in Powerbasic, but in Freebasic we just use ZINT and that tool is amazing.
I should have done the full move to Freebasic long time ago.

The only challenge i still have is how to PRINT a ZINT barcode on a label printer.
But I know Paul will know how, and I will go down that direction very soon.

Thanks for all the advice.

-Peter
Title: Re: Outlook .MSG
Post by: RodMacia on June 09, 2023, 11:06:08 PM
Not to take anything away from WinFBE.

I have posted code about 3 years ago on using ZINT with Powerbasic in pb's forum.
Print Barcodes using Xprint.
If your Barcode printer uses a windows driver than it's easy to use.

The Zint DLL, Using ZINT's ZBarcode_Encode_and_Buffer, you can generate the barcodes in memory and use them, without the need to save them to file. Which should be more efficient with large batches.

Rod