This project is read-only.

demoapp don't work with

Jan 19, 2013 at 7:02 AM
Edited Jan 19, 2013 at 7:03 AM

i have a email of alibaba,and  i run the demo ,but it don't work



Jan 19, 2013 at 11:44 AM

sorry,it work when i change one line code:

private ImapClient CreateClientByAccount(Account account)
            try {
                var client = new ImapClient {Security = account.Security};
                client.ManualSaslAuthenticationRequired += (sender, e) => AuthenticateManually(e, account);
                var port = client.Security == SecurityPolicies.Explicit ? ImapPorts.Ssl : ImapPorts.Default;
                client.Connect(account.Host, port);
                return client;
            catch (Exception ex) {


Thanks in advance!

Jan 19, 2013 at 11:51 AM
Edited Jan 19, 2013 at 12:33 PM

but when i get mailmessage,there have a error:

String reference not set to an instance of a String.
Parameter name: s


and some email can't get view

private void DisplayMessage(MyMessage message)

            foreach (var attachment in message.Message.Attachments) {
                var item = new ListViewItem(attachment.Filename) {Tag = attachment, BackColor = Color.Orange, ForeColor = Color.WhiteSmoke};

//here count=0,but the email body is no null,there have problem
        if (message.Message.Views.Count == 0) {

            if (message.Message.HasHtmlView) {
                var html = message.Message.GetHtmlView();
            } else {
                var plain = message.Message.GetPlainTextView();

                if (plain == null) {
                    if (message.Message.Views.Count > 0) {
                        plain = message.Message.Views.First();

                if (plain == null) {
                    LogSafely("No view found ... shouldnt be ...");

                // we want line breaks in text documents
                if (string.IsNullOrEmpty(plain.Text)) {

                DisplayView(plain.Text.Replace(Environment.NewLine, "<br />"));


can you give me a email to send this email to you?

Jan 25, 2013 at 11:54 PM

Unfortunately, I don't have time to administrate this project anymore.

You will need to step through the code manually and check, why the error occurs.

Feb 2, 2013 at 11:37 AM
Edited Feb 2, 2013 at 12:17 PM
i debug step by step ,no view because the email content type is "MultipartMixed",but i don't know how to fix it.
Feb 4, 2013 at 3:13 PM
Multipart/mixed is merely an indication that the content in the node is made up of nodes of different types, such as "text+attachment".
A View can never be multipart/mixed a view must be of type text/html, text/plain or some other kind of terminal node.
Can u view the mail in a regular email client, such as Thunderbird or Outlook ?