Logo
arrow1 File Converters
arrow1 TIFF and PDF apps
arrow1 Forensic
arrow1 Freeware

Add Mail Converter Into Your Solution

 

Ever wanted to add an email converter functionality to your solution? We offer you a ready-to-use library. All you have to do is to add a few lines of code and your users will be able to save emails as PDF, DOC, TIFF, JPEG, EML, PST files via command line.

mail converter sdk

Our clients say:
"I am very pleased with the product. So far it has passed all of our initial QA tests. I am making use of the tool programmatically as part of a larger custom stand-alone custom legacy content management system migration. The current legacy system stores email content in MSG format. We recommended that we provide that content in the EML and PDF formats during the migration in order to provide more standardized access to this content. This is where your tool fits in. We have successfully integrated your tool into our migration program to facilitate this task for this customer."

Jeff Primeau
Senior Consultant
Decision Labs Inc.
www.decisionlabs.com
.
.

  • Server License:
    If Total Mail ConverterX is licensed with server license terms, you are granted the non-transferable, non-exclusive, and perpetual right to deploy the licensed software to one server to be used in one company by up to 100 employees. One server license restricts to one server. ActiveX is included.

  • Royalty-free License:
    You may implement Total Mail ConverterX into your product and distribute the program to third parties as an integral part of such product. RFL is licensed per project. Your customers are unaware that CoolUtils app is inside, no additional registration from them is required. It's the easiest way for you to add email conversion functionality into your system.

We offer very cost-effective solutions. Prices start from $149.90 per server license!

Total Mail ConverterX is great for any need: email archiving, adding emails to any EDS, retreiving emails for a legal matter or freedon of information requests.


 

Download Now!

Updated Mon, 25 Mar 2024

Examples of Total Mail ConverterX

Convert Mail files With TotalMailConverterX and .NET

Example .NET:

string src="C:\\test\\Source.Mail";
string dest="C:\\test\\Dest.PDF";

MailConverterX Cnv = new MailConverterX();
Cnv.Convert(src, dest, "-c PDF -log c:\\test\\Mail.log");

MessageBox.Show("Convert complete!");

Download .NET Mail Covnerter example

Convert Mail Files With Docker by Total Mail ConverterX

docker run -p 5000:5000 tdhster/mailconverter-api

Convert Mail Files On Web Servers With Total Mail ConverterX

public static class Function1
    {
        [FunctionName("Function1")]
        public static async Task Run(
            [HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req,
            ILogger log)
        {
            StringBuilder sbLogs = new StringBuilder();
            sbLogs.AppendLine("started...");
            try
            {
                ProcessStartInfo startInfo = new ProcessStartInfo();
                startInfo.CreateNoWindow = true;
                startInfo.UseShellExecute = false;
                var assemblyDirectoryPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
                assemblyDirectoryPath = assemblyDirectoryPath.Substring(0, assemblyDirectoryPath.Length - 4);

                var executablePath = $@"{assemblyDirectoryPath}\Converter\MailConverterX.exe";
                sbLogs.AppendLine(executablePath + "...");
                var msgPath = $@"{assemblyDirectoryPath}\MSG\MSG-1.msg";
                var outPath = Path.GetTempFileName() + ".pdf";
                startInfo.FileName = executablePath;

                if (File.Exists(outPath))
                {
                    File.Delete(outPath);
                }

                if (File.Exists(executablePath) && File.Exists(msgPath))
                {
                    sbLogs.AppendLine("files exists...");
                }
                else
                    sbLogs.AppendLine("EXE & MSG files NOT exists...");
                startInfo.WindowStyle = ProcessWindowStyle.Hidden;
                startInfo.Arguments = $"{msgPath} {outPath}";
                using (Process exeProcess = Process.Start(startInfo))
                {
                    sbLogs.AppendLine($"wait...{DateTime.Now.ToString()}");
                    exeProcess.WaitForExit();
                    sbLogs.AppendLine($"complete...{DateTime.Now.ToString()}");
                }

                int sleepCounter = 10;

                while(!File.Exists(outPath) && sleepCounter > 0)
                {
                    System.Threading.Thread.Sleep(1000);
                    sbLogs.AppendLine("sleep...");
                    sleepCounter--;
                }
                if (File.Exists(outPath))
                    sbLogs.AppendLine("Conversion complete successfully.");
            }
            catch (Exception ex)
            {
                sbLogs.AppendLine(ex.ToString());
            }

            return new OkObjectResult(sbLogs);
        }
    }
Some more infromation about Azure.

Convert Mail Files On Web Servers With Total Mail ConverterX

dim C
Set C=CreateObject("MailConverter.MailConverterX")
C.Convert "c:\test\source.eml", "c:\test\dest.pdf", "-cPDF -log c:\mail.log"
Response.Write C.ErrorMessage
set C = nothing
Example2 ASP: directly stream the resulting PDF
dim C
Set C=CreateObject("MailConverter.MailConverterX")
Response.Clear
Response.AddHeader "Content-Type", "binary/octet-stream"
Rresponse.AddHeader "Content-Disposition", "attachment; filename=test.pdf"
Response.BinaryWrite c.ConvertToStream("C:\www\ASP\Source.eml", "C:\www\ASP", "-cpdf  -log c:\html.log")
set C = nothing
Some more samples in C# specifically for ASP.net. If you need examples on other languages please contact us. We will create any example specially for you.

Convert MSG & EML Files On Web Servers With Total Mail ConverterX

Example PHP:
$src="C:\\test\\test.msg";
$dest="C:\\test\\test.pdf";
if (file_exists($dest)) unlink($dest);
$c= new COM("MailConverter.MailConverterX");
$c->convert($src,$dest, "-c pdf -log c:\\Mail.log");
if (file_exists($dest)) echo "OK"; else echo "fail:".$c->ErrorMessage;

Convert Mail Files With Total Mail ConverterX and Ruby

require 'win32ole'
c = WIN32OLE.new('MailConverter.MailConverterX')

src="C:\\test\\test.pdf";
dest="C:\\test\\test.tiff";

c.convert(src,dest, "-c TIFF -log c:\\test\\Mail.log");

if not File.exist?(dest)
  puts c.ErrorMessage
end

Convert Mail files With Total Mail ConverterX and Python

import win32com.client
import os.path

c = win32com.client.Dispatch("MailConverter.MailConverterX")

src="C:\\test\\test.eml";
dest="C:\\test\\test.tiff";

c.convert(src, dest, "-c TIFF -log c:\\test\\Mail.log");

if not os.path.exists(file_path):
  print(c.ErrorMessage)

Convert Mail files With Pascal and Total Mail ConverterX

uses Dialogs, Vcl.OleAuto;

var
  c: OleVariant;
begin
  c:=CreateOleObject('MailConverter.MailConverterX');
  C.Convert('c:\test\source.eml', 'c:\test\dest.tiff', '-c TIFF -log c:\test\Mail.log');
  IF c.ErrorMessage<> Then
    ShowMessage(c.ErrorMessage);
end;

Convert Mail Files On Web Servers With Total Mail ConverterX

var c = new ActiveXObject("MailConverter.MailConverterX");
c.Convert("C:\\test\\source.msg", "C:\\test\\dest.pdf", "-c PDF");
if (c.ErrorMessage!="")
  alert(c.ErrorMessage)

Convert Mail files With Total Mail ConverterX and Perl

use Win32::OLE;

my $src="C:\\test\\test.eml";
my $dest="C:\\test\\test.tiff";

my $c = CreateObject Win32::OLE 'MailConverter.MailConverterX';
$c->convert($src,$dest, "-c TIFF  -log c:\\test\\Mail.log");
print $c->ErrorMessage if -e $dest;
Support
Get all CoolUtils products
for $99 only
read more

  (you save up to $500)


Total Mail Converter X Preview1
Total Mail Converter X Preview2

Related Topics

Latest News

Newsletter Subscribe

No worries, we don't spam.


© 2024. All rights reserved. CoolUtils File Converters

Cards