PreMailer.Net
PreMailer.Net copied to clipboard
Outlook 2007+ ignores inline style with !important
Hi,
Outlook 2007 and greater ignores inline styles when the style has the !important rule. See https://www.campaignmonitor.com/blog/email-marketing/2010/05/outlook-2007-and-the-inline-important-declaration/ for a blog about it.
In de CssAttribute class the ToString method explicitly includes the important rule in the output string. As far I can see a fix would be to not include the rule in the output string.
Since all styles are merged into the inline style property, is there a reason to include the important rule?
Regards
I would like to bump this issue. We experience the same problems with Outlook 365.
To me it seems very reasonable to strip the !important declaration when inlining the style attribute.
This issue was fixed with PR #260.
I am closing this as completed. Comment on this thread if there are any further issues.