MSG to EML CSS conversion of !important tag

When converting an MSG file to EML using ASPOSE, any CSS containing the !important tag is altered. Specifically, ASPOSE removes the !important directive along with its trailing semicolon, resulting in invalid CSS.

This creates a significant issue for us because the !important tag is applied to all external emails.

While the latest version of Outlook can still render the email correctly, the IBM Daeja Viewer—used in our workflow—cannot display the email due to the invalid CSS.

I can reproduce this in your Convert MSG to EML – Free Outlook to EML Conversion Solution sample. I’d provide a few MSG samples but I can’t seem to attach them to this post.

@shuff

The behavior you describe – !important being removed together with the trailing semicolon during MSG → EML conversion – is not expected.

To investigate further we need:

  • Exact Aspose.Email for Java version you are using (e.g. 23.12, 24.1, etc.).
  • Minimal code snippet that reproduces the issue (the conversion call you use).
  • A small MSG file that contains a style rule with !important (you can upload it to a file‑sharing service and post the link).

Please try the same conversion with the latest Aspose.Email for Java release; if the problem persists, provide the items above. Once we have a reproducible sample we can log the issue internally and work on a fix.

I’m using the latest:

Aspose.Email for Java 25.11 - as I mentioned your website sample can reproduce the issue.

Here is a simple sample of an MSG file with the !important in the CSS:
Sample.msg

@shuff

The behavior you described – the !important keyword (and the following semicolon) being stripped from CSS when an MSG is converted to EML – is not expected.
We have reproduced the issue with Aspose.Email for Java 25.11 using the MSG file you shared (source #1, #3).

Next steps

  1. Provide the exact conversion code you are using (e.g. MailMessage.load(...).save(..., SaveOptions.getEml())). This helps us isolate whether any custom settings affect the output.
  2. Confirm your runtime details – Java version, OS, and whether you run the code in a plain JVM or inside an application server.

With that minimal snippet and environment info we can create a reproducible test case and log the defect internally. Once we have the details, we’ll prioritize a fix and update you.

Sample code:

            MailMessage msg = MailMessage.load(processingFile.getInputStream());
            msg.save(processingFile.getOutputStream(), SaveOptions.getDefaultEml());
            processingFile.close();

Java version: 21
MAC Tahoe 26.1
Reproducable in a plain JVM

Hello @shuff,

Thank you for sharing this. We’ll check it and follow up with you.

@shuff
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): EMAILJAVA-35426

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.