Search code examples
iosobjective-cmailcore2

MailCore: Offline HTML Rendering


It doesn't seem possible to use htmlBodyRenderingOperationWithMessage: when offline (I get the error A stable connection to the server could not be established.). Why is this?

I already have the MCOIMAPMessage stored locally and thought it contained everything necessary to render the message. Is htmlBodyRenderingOperationWithMessage: pulling more data from the server?


Solution

  • Methods for rendering of MCOIMAPSession have limited capabilities.

    To support offline rendering of message, you should use: -[MCOIMAPMessage htmlRenderingWithFolder:delegate:]

    Use MCOHTMLRendererIMAPDelegate to provide offline data required to render the message.