CTCoreMessage:setBody: causes htmlBody to be filled with the plain text body #28

Open
junjie opened this Issue Aug 21, 2012 · 1 comment

Projects

None yet

1 participant

@junjie
junjie commented Aug 21, 2012
CTCoreMessage *message = [CTCoreMessage new];
[message setTo:@"recipient@test.com];
[message setFrom:[NSSet setWithObject:@"myself@test.com"]];
[message setBody:@"Some long body text"];
NSLog(@"Body: %@", message.body);
NSLog(@"HTML Body: %@", message.htmlBody);

We save a copy of this message object in the outbox/local sent message folder of some sort.

When accessing this message object, it becomes misleading that the mail actually had HTML content when it really doesn't.

The issue is that if we trust MailCore to return HTML content while accessing htmlBody, but what it returns is actually plain text, then formatting becomes an issue as line breaks in plain text are ignored by UIWebView.

Also found that if you set htmlBody to nil or @"" to prevent the issue, both body and htmlBody becomes empty.

@junjie
junjie commented Sep 28, 2012

Hi, any updates on this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment