detachAttachmentsWOPrompts will create duplicate filenames if needed. But in the message body as shown, you don't see that. Here is a sample message body: ===== 6 svcpack.log You deleted an attachment from this message. The original MIME headers for the attachment were: Content-Type: text/plain; name="svcpack.log" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="svcpack.log" ===== In the case, because of a duplicate name, the actual filename as stored is "svcpack-1.log"
I think I confused the deleted message with the detached message.