Hi!In EPiServer Mail 7 we have a mail-template with markup. Inside the markup we have a simple style-tag:<style type="text/css">/* ----- Styling ----- */</style>The mail also contains a link which lets the user view the mail on the web. To be able to view the message online, we use some code from the EPiServer Mail 7 API:// Start dummy code// Get hold of the messageMessage message = EPiServerMailHandler.GetMessageByGuid(messageGuid);// Get hold of the mail's markupmailContent = new StringBuilder(message.BodyHtml);// End dummy codeHowever when examining the source of the page, the style-tag has been removed. Can anyone explain why this is?We implement the same code in EPiServer Mail 4.4 without having the style-tag removed.
That sounds a bit strange. Does the behavior change if you uncheck the "remove scripts" option when sending?
While that option is not supposed to remove style tags specifically (rather script, object and some things along those lines) it is the option that would pass the mail body through an html filter that is removing some things and I think that would be a good first troubleshooting step.
Thank you for your response, Håkan!
I can't seem to find the "remove scripts" option in EPiServer Mail 7. In EPiServer Mail 4.4 I know we had a radio button with that option.
I made a new mail and posted it, and now it seems like the style-tag is present again. Guess I have to wait and see if the problem occurs again.
This issue is now registered as a bugBug #113463: Style-tag being removed in EPiServer Mail 7It will go through normail triage and then you can follow this on http://world.episerver.com/Support/Bug-list-beta/
Any solution to this yet?
The bug is fixed and a new package was built today. It will now be tested to verify the fix and then it can be sent out to partners requesting it.
In case you affected and like to have it sent over please contact Developer Support and we can provide the package as soon as the tests are finished.
I hope you haven't introduced any other bugs in EPiServer Mail 7. We're currently experiencing problems sending mail to certain e-mail addresses. It worked yesterday but not today...