0 votes
by (150 points)
edited by

Hello,

we use Rebex Secure Mail to send encrypted html emails. If the email contains german umlauts (like äöü), they will not be displayed correctly in OWA (Outlook Web Access).

The encoding ist set to utf-8, the html body is:

<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <title></title>
  </head>
  <body>
    <h2>HTML mail with german umlauts</h2>
    <div>äöüßÄÜÖ</div>
    <br/>
    <span>Mit freundlichen Grüßen</span>
  </body>
</html>

The following picture shows the difference between Outlook and OWA:

Mail

Some example how we create an send the email:

var mimeMessage = new MailMessage();
mimeMessage.BodyHtml = "some html text";
mimeMessage.DefaultCharset = System.Text.Encoding.UTF8;
mimeMessage.Encrypt(receiverCertificates);

Smtp.Send(mimeMessage, config);

So my question:
Did we forget something or is this a bug in Outlook Web Access ?

1 Answer

+1 vote
by (147k points)
selected by
 
Best answer

I guess that a problem in the e-mail message such as a mismatch between MIME entity's charset and HTML charset is more likely to be a cause than a bug in Outlook Web Access. How do you actually construct the message? Do you assign the HTML text via MailMessage.BodyHtml, or via MailMessage.Views?

One random tip that might help - try setting the default charset to UTF-8:

var mail = new MailMessage();
mail.DefaultCharset = System.Text.Encoding.UTF8;
mail.BodyHtml = "some html text";
mail.Encrypt(...);
by (150 points)
Thank you for your response. Ive updated my question with an example how we create an send the email.
by (147k points)
Does this problem occur with unencrypted messages as well, if they are otherwise constructed in the same way, just without the Encrypt method call?
by (150 points)
The problem does not occur if i comment out the Encrypt method call.
by (147k points)
Thanks! In that case, it looks like either there is a bug related to the Encrypt method, or it's really a server-side issue. We'll look into this!
by (147k points)
The DefaultCharset property must be assigned before BodyHtml/BodyText, so please try swapping them:

var mimeMessage = new MailMessage();
mimeMessage.DefaultCharset = System.Text.Encoding.UTF8;
mimeMessage.BodyHtml = "some html text";
mimeMessage.Encrypt(receiverCertificates);

Smtp.Send(mimeMessage, config);
by (150 points)
This solves the problem.

Thanks for the support
...