0

We use an in house software to generate html templates for our clients. We spend to much time teaching our clients how to save the templates. We are trying to track down a way to export the html into a .oft template.

It is easy enough to create the files but the encryption or encoding of the file is throwing us through a loop.

Is there a library or code that we can use to convert an html file? We would prefer to work with php but we can work with other languages if needed.

Douglas Cottrell
  • 334
  • 1
  • 4
  • 14

1 Answers1

2

You can try to use Redemption for that (it can be used from PHP - I am its author) - create an instance of the RDOSesssion object, call RDOSession.CreateMessageFromMsgFile (returns RDOMail object), set the RDOMail.HTMLBody property, save it as an OFT file (RDOMail.SaveAs(..., olTemplate)

Dmitry Streblechenko
  • 62,942
  • 4
  • 53
  • 78
  • 1
    We are looking for an open source solution as we would like to sell this at some point. – Douglas Cottrell Nov 20 '14 at 06:04
  • 1
    @DmitryStreblechenko - Do you have any examples of this? I do not see a PHP compatible version of Redemption anywhere. Thanks. – Lee Fuller May 27 '16 at 20:08
  • 1
    Redemption is a regular IDispatch-friendly COM library, just like the Outlook Object Model. If you can use OOM in PHP, you can use Redemption - use com_load_typelib, new COM(), etc. – Dmitry Streblechenko May 27 '16 at 20:55
  • 1
    I should have mentioned, this will be on a linux server. Is there any trick to this? Any chance there are examples floating around? We just need to take a formatted HTML output and generate the OTF from it. Thanks. – Lee Fuller May 27 '16 at 22:47
  • 1
    Redemption only runs on Windows. It also needs the MAPI system to be installed (which means Outlook must be installed). – Dmitry Streblechenko May 28 '16 at 00:20