Upgrading to new version

Apr 29, 2014 at 10:18 AM
Hi!
I wanted to ask ,is upgrading to new version codebreaking? And if yes, then how much would I have to change if I wanted to switch to new version ? (I'm using all features connected with mail, POP3, IMAP, and SMTP )
Coordinator
Apr 29, 2014 at 2:32 PM
Hi.

It may be some of code breaking in new version(2.3.7).

I'll update documentation but it will take 1-3 weeks.
Sorry inconvenience.
I think that it is better to provide new version without documentation who could modify their code by themself.

But there are few breaking change.
Maybe you can modify your code by yourself.
And if you ask here, I'll show you how to modify your code to upgrade new version.

regards.
Apr 29, 2014 at 4:10 PM
Edited Apr 29, 2014 at 4:59 PM
I can manage, I was just asking, cause I was wondering if I should upgrade, I see You have added HtmlFiles to the Content, which is great, no need for my hacky code to get html anymore :)
EDIT:
I did happen upon a problem with IMAP, it's not downloading messages, it keeps getting MailClientException when trying to select folders with ImapClient.SelectFolder ( it's gmail ), and it's an account which before upgrade worked just fine.
Coordinator
Apr 29, 2014 at 5:41 PM
Old version before 2.3.6, below code provide you a same feature of HtmlFiles at latest version.
var htmlMessageList = MailMessage.GetAllContents(mg).Find(el => el.IsHtml);
Apr 29, 2014 at 7:43 PM
Hmm I see now that HtmlFiles don't work every time, but what seems to be working is something like this: (mm is of type MailMessage )
            if(!string.IsNullOrEmpty(mm.BodyHtml))
            {
                msg.Text = mm.BodyHtml;
            }
            else if (!string.IsNullOrEmpty(mm.BodyRawHtml))
            {
                msg.Text = mm.BodyRawHtml;
            }
            else if (!string.IsNullOrEmpty(mm.BodyText))
            {
                msg.Text = mm.BodyText;
            }
            else
            {
                msg.Text = mm.BodyRawText == null ? "" : mm.BodyRawText;
            }