Outlook – Trying to convert HTML files to EML

emailgmailmicrosoft-outlookthunderbirdthunderbird-addon

I am trying to import some messages from my old mail client to thunderbird v24.3 (so that they will sync into gmail). I have all the messages saved as .html files as this is the only option I was given on export from that mail client. I have tried to find a converter that will convert these files to eml so that I can view them in thunderbird but I am yet to find such a tool on the web. Does anyone know how I can convert html to eml (or msg or pst, and then I can use PST Viewer) so that I can then gain access to these emails in thunderbird or outlook, or even directly into gmail? I have both windows and mac so willing to try any options on those.
Thanks,
Anna

Best Answer

I'm sure there must be other methods to export mail from Thunderbird. But if you really have only html files, you could use this script as a workaround. You will lose sender, recipient and subject, but the body will still be readable.

@echo off

for %%f in (*.html) do (
    echo Content-Type: text/html > %%~nf.eml
    echo. >> %%~nf.eml
    type %%f >> %%~nf.eml
)

Save the script with a .bat file extension, and place it in a directory containing the html files. Double click on it to generate an eml file for each html.

Related Question