0 votes

i am using this(MailForWindowsStore.dll) library in Unity3D for windows platform and i am getting this error while trying to create build.

Exception: Data error (cyclic redundancy check). (Exception from HRESULT: 0x80070017)
at Windows.Security.Cryptography.Core.CryptographicEngine.Decrypt(CryptographicKey key, IBuffer data, IBuffer iv)
at ? . (String encryptedText)
at ? . (String encrypted)
at .get_Windows1252()
at Limilabs.Client.ClientBase..ctor()
at Limilabs.Client.SMTP.Smtp..ctor()

And here is my code

    using (Smtp smtp = new Smtp())
    {
        smtp.Connect("smtp.gmail.com", 587, true);
        smtp.StartTLS();
        smtp.Login("testmail@gmail.com", "test@123");


        MailBuilder builder = new MailBuilder();
        builder.Text = "text";
        builder.From.Add(new MailBox("testmail@gmail.com"));
        builder.To.Add(new MailBox("someone@gmail.com"));

        MimeData attachment = builder.AddAttachment(capturedFile).Result;
        attachment.ContentType = ContentType.ImageJpeg;

        IMail email = builder.Create();

        ISendMessageResult result = smtp.SendMessage(email);
        if (result.Status == SendMessageStatus.Success)
        {
            // Message was sent.
            Debug.LogError("sent mail successfully");
        }


        smtp.Close();
    }
by (200 points)

1 Answer

0 votes

Turn off '.NET native tool chain' and check.

In VS this option is on the 'Build' tab in project properties, below 'Platform target'

by (301k points)
Hey,

First of all thank for the reply, But i am unable to find the .NET native tool chain in project->Properties->Build

I am using VS community 2015
To be honest I don't know how unity works. Does it recompile or merge assemblies?
...