Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET Outlook Converter

 AfterLogic Forum : MailBee.NET Outlook Converter
Subject Topic: UTF8 Html Body becomes ???? Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
klausmueller
Newbie
Newbie


Joined: 05 September 2015
Online Status: Offline
Posts: 2
Posted: 05 September 2015 at 10:14am | IP Logged Quote klausmueller

Hi,
why the following unit test fails?

public void TestMethod1()
        {
            MailMessage message = new MailMessage();
            message.BodyHtmlText = @"<html><head><meta charset=""UTF-8""></ head ><body>鱙鷭黂 犈犆犅 艎艑蔉 撖 磑禠, 摬摙敳</body> ";
            message.BodyPlainText = "鱙鷭黂 犈犆犅 艎艑蔉 撖 磑禠, 摬摙敳";
            MsgConvert convert = new MsgConvert();
            MemoryStream mem = new MemoryStream();
            convert.MailMessageToMsg(message, mem);
            mem.Position = 0;
            var message2 = convert.MsgToMailMessage(mem);
// that one works
            Assert.AreEqual(message.BodyPlainText, message2.BodyPlainText);
//that one doesn't work, Body in message2 is ??? ??? ??? ? ??, ???
            Assert.AreEqual(message.BodyHtmlText, message2.BodyHtmlText);
        }

Why the Chinese text is not encoded correctly?
Thanks
Back to Top View klausmueller's Profile Search for other posts by klausmueller
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 07 September 2015 at 4:47am | IP Logged Quote Alex

Please try the latest http://www.afterlogic.com/updates/mailbee_net.zip (.net 2.0+ and .net 4.0+ builds). Working fine for me.

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 
klausmueller
Newbie
Newbie


Joined: 05 September 2015
Online Status: Offline
Posts: 2
Posted: 08 September 2015 at 5:10pm | IP Logged Quote klausmueller

Ah Great, thank you, in the newest version it worked!!

Now when I want to send the mail, outlook tells me, that I have no right to send the mail. I had the same issue before with aspose.email, but that I could fix by setting the MSGFLAG_FROMME (https://msdn.microsoft.com/en-us/library/office/cc839733.aspx) in the E-Mail. I can set it to draft, but how can I set the MSGFLAG_FROMME for the MSG file?

Thank you very much!
Back to Top View klausmueller's Profile Search for other posts by klausmueller
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 09 September 2015 at 5:13am | IP Logged Quote Alex

Please try the latest http://www.afterlogic.com/updates/mailbee_net.zip (.net 2.0+ and .net 4.0+ builds).

Set MsgConvert.MsgIsFromMe=true before doing conversion. This will set the flag.

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide