MFMailComposeViewController adds null Content-Id
<p>This is my first post to the group so please be kind :)</p>

<p>I am sending a couple of audio attachments from my app as follows:</p>

<pre><code> MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
 picker.mailComposeDelegate = self;
 picker.modalPresentationStyle = UIModalPresentationCurrentContext;
 [picker setSubject:@"Test message"]; 
 NSArray *toRecipients = [NSArray arrayWithObject:@"foo@bar.com"];
 [picker setToRecipients:toRecipients];

 // multiple attachments are made as follows
  NSData *myData = [NSData dataWithContentsOfFile:filePath];
 [picker addAttachmentData:myData mimeType:@"audio/x-caf" fileName:fileName];

 [picker setMessageBody:@"test message" isHTML:NO];

 [controller presentModalViewController:picker animated:YES];
</code></pre>

<p>A mailComposeController method takes care of dismissing the modal view.</p>

<p>Unfortunately, when the message is delivered the mime headers for the attachments land up having the Content-Id set to null. Here is what it looks like:</p>

<pre><code> Content-Type: audio/x-caf; name="audio_1.caf"
 Content-Transfer-Encoding: base64
 Content-Id: &lt;(null)&gt;
 Content-Disposition: attachment; filename="audio_1.caf"
</code></pre>

<p>If I manually delete the Content-Id field and reload the message in my Mac Mail program (Mail Version 3.6) the attachments show up correctly. In other words, I don't really need/want theContent-Id to be inserted in the mime header.</p>

<p>Also, its worth mentioning that for debugging purposes if I set the mime type to "image/jpeg" the mime header does get a valid Content-Id string. All my attachments show up in Mail. As is to be expected, in that case the attachments don't open correctly on the Mac or iPhone.</p>

<p>Any help would be greatly appreciated.</p>

<p>thanks,
apurva</p>
