login about faq

First of all, warm greetings to all the members of this forum. I have just registered and this is my first post here. :)

Getting back to the business..

I am evaluating the Chilkat Windows Phone Runtime Component (http://www.chilkatsoft.com/winPhone.asp) for its IMAP and POP support for Windows Phone 8 XAML/C# app. But, am facing issues while trying to send an email through SMTP server using this Component on WP8. I have already searched through this forum, but did not find a discussion on the issue I am facing, hence this question.

Following is the code snippet that I have in OnNavigatedTo() of MainPage.xaml.cs in WP8 App:

        // Initialize mail manager..
        Chilkat.MailMan mailMan = new MailMan();
        mailMan.UnlockComponent("30-day trial");
        mailMan.SmtpHost = "smtp.xyz.com";
        mailMan.SmtpPassword = "decoderPassword";
        mailMan.SmtpUsername = "decoder@xyz.com";
        mailMan.SmtpPort = 587;

        mailMan.OpenSmtpConnection();

        // Form an email to send..
        Email mail = new Email();
        mail.FromAddress = "decoder@xyz.com";
        mail.From = "decoder@xyz.com";
        mail.FromName = "Decoder";
        mail.AddTo("Decoder-Gmail", "decoder@gmail.com");
        mail.Subject = "Test Mail";
        mail.Body = " This is a test mail.";

        if(!mailMan.IsUnlocked())
        {
            MessageBox.Show("MailMan not unlocked: " + mailMan.LastErrorText);
            return;
        }
        if (mailMan.IsSmtpConnected)
        {
            // Send email..
            bool bSendResult = mailMan.SendEmail(mail);
            if (bSendResult == true)
                MessageBox.Show("Mail sent successfully.");
            else
                MessageBox.Show("Mail send failed: " + mailMan.LastErrorText);
        }
        else
        {
            MessageBox.Show("Failed to connect to SMTP server: " + mailMan.LastErrorText);
        }

When mailMan.SendEmail(mail) is executed, it triggers an Access Violation Exception.

Exception Details:

System.AccessViolationException was unhandled HResult=-2147467261 Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt. InnerException: null

Note: I am using the 30 day-evaluation and have set the Unlock Component to "30-day Trial" in mailMan.

Can you please help me resolve this issue? Has anyone encountered this issue or been able to successfully use this component for WP8?

  • Decoder

asked Jun 13 '14 at 06:24

Decoded's gravatar image

Decoded
21115

edited Jun 13 '14 at 07:34


This new build fixes it:

http://www.chilkatsoft.com/download/9.5.0.40/chilkat-9.5.0-winPhoneRTC.zip

The problem was caused by a bug in the outer-layer CX code generation. Given that the new version (v9.5.0.40) was only out for 1 or 2 days, and that it was a simple fix in the outer-layer generated code, which means it wasn't an internal problem and only affects the Windows Phone RTC build, Chilkat did not increment the version number. The problem was related to any method that passes an object reference in the method arguments.

link

answered Jun 13 '14 at 11:11

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

I just tried it with the modified version you provided and that did the trick! I am now able to send email over SMTP from WP 8 SilverLight App.

Thanks @chilkat!

(Jun 13 '14 at 11:42) Decoded

Thanks for the report. I'm testing to see if I can reproduce the problem..

link

answered Jun 13 '14 at 09:42

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×184
×79
×12
×2
×1

Asked: Jun 13 '14 at 06:24

Seen: 2,105 times

Last updated: Jun 13 '14 at 11:42

powered by OSQA