Convert HTML emails to EML/OFT - Self Contained Package or Cloud API?

Hello, I had a question around products that convert HTML emails.

Essentially I am looking for a solution to programmatically transform fully finished HTML emails into OFT and EML files for use in Outlook. This needs to be done inside a PHP application we’ve built. I’ve been reviewing Aspose documentation and it seems they are able to accomplish this (Email Message Files|Documentation).

My questions were around products. Ideally we would host the software on our servers due to privacy restrictions for a number of our clients. Sending their emails outside of our software would breach contract. I noticed Aspose had a GitHub repo (link). Is this repo self contained or does it make external calls to the Aspose cloud to handle the transformation? If we could hose the entire package that would be awesome, just not sure how this codebase handles the transformations.

Any guidance appreciated!

@markstoryports,
Welcome to our community! Thank you for your request. I will pass your topic to a more suitable forum.

This topic has been moved to the related forum: Convert HTML emails to EML/OFT - Self Contained Package or Cloud API? - Free Support Forum - aspose.cloud

@markstoryports,

In this case, we would like to suggest you using Aspose.Email for C++ with PHP native extensions. This way doesn’t use Aspose clouds and outside sofware. We can prepare examples of such an extension for you. Could you share the PHP code snippet demonstrating the desired API, please?
Note: You will need to obtain a license for Aspose.Email for C++.

Hey Thanks! So I don’t have any sample PHP code right now, this integration would be built from scratch and I still need to research infrastructure. But the function might be something like:

function convertHTML($html = ''){
  ...API code to Convert ...
  return ['EML' => $emlObject, 'OFT' => $oftObject  ]
}

$emailHTML = file_get_contents('..path/to/email.html');
$convertedHTML = convertHTML($emailHTML);
$emailOFT = $convertedHTML['OFT'];
$emailEML = $convertedHTML['EML'];

Again, still need to dig into how I would go about writing this API, but any code samples you could provide would be very appreciated.

@markstoryports,
Thank you for the code example. I’ve logged the issue in our tracking system with ID EMAILCPP-299. Our development team will consider a suitable API for your purposes.

Awesome thanks! We were hoping we can run it off a Linux/Unix environment is possible, but feel free to advise as it appears we need to load Visual Studio so it may require a Windows Machine with .net.

Much appreaciated

@markstoryports,
We will take these wishes into account.

@markstoryports,
Our development team prepared code examples for PHP with Aspose.Email for C++ demonstrating how to convert emails to EML/OFT format. Please take a look at them.