Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Always parse content ID if is part of the MIME fields

  • Loading branch information...
commit 1e5dbbbd197dcdd995c5a920ea7eac87bdfbe0d4 1 parent 1ce3163
@mronge mronge authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 Source/CTMIME_SinglePart.m
View
7 Source/CTMIME_SinglePart.m
@@ -87,6 +87,10 @@ - (id)initWithMIMEStruct:(struct mailmime *)mime
mMimeFields = mailmime_single_fields_new(mMime->mm_mime_fields, mMime->mm_content_type);
if (mMimeFields != NULL) {
+ if (mMimeFields->fld_id != NULL) {
+ self.contentId = [NSString stringWithCString:mMimeFields->fld_id encoding:NSUTF8StringEncoding];
+ }
+
struct mailmime_disposition *disp = mMimeFields->fld_disposition;
if (disp != NULL) {
if (disp->dsp_type != NULL) {
@@ -110,9 +114,6 @@ - (id)initWithMIMEStruct:(struct mailmime *)mime
if (mMimeFields->fld_disposition_filename != NULL) {
self.filename = [NSString stringWithCString:mMimeFields->fld_disposition_filename encoding:NSUTF8StringEncoding];
- if (mMimeFields->fld_id != NULL)
- self.contentId = [NSString stringWithCString:mMimeFields->fld_id encoding:NSUTF8StringEncoding];
-
NSString* lowercaseName = [self.filename lowercaseString];
if([lowercaseName hasSuffix:@".xls"] ||
[lowercaseName hasSuffix:@".xlsx"] ||
Please sign in to comment.
Something went wrong with that request. Please try again.