{"action":"created","issue":{"url":"https://api.github.com/repos/jstedfast/MimeKit/issues/106","labels_url":"https://api.github.com/repos/jstedfast/MimeKit/issues/106/labels{/name}","comments_url":"https://api.github.com/repos/jstedfast/MimeKit/issues/106/comments","events_url":"https://api.github.com/repos/jstedfast/MimeKit/issues/106/events","html_url":"https://github.com/jstedfast/MimeKit/issues/106","id":60513539,"number":106,"title":"MimePart.FileName is null","user":{"login":"michaeldtaylor","id":248046,"avatar_url":"https://avatars.githubusercontent.com/u/248046?v=3","gravatar_id":"","url":"https://api.github.com/users/michaeldtaylor","html_url":"https://github.com/michaeldtaylor","followers_url":"https://api.github.com/users/michaeldtaylor/followers","following_url":"https://api.github.com/users/michaeldtaylor/following{/other_user}","gists_url":"https://api.github.com/users/michaeldtaylor/gists{/gist_id}","starred_url":"https://api.github.com/users/michaeldtaylor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaeldtaylor/subscriptions","organizations_url":"https://api.github.com/users/michaeldtaylor/orgs","repos_url":"https://api.github.com/users/michaeldtaylor/repos","events_url":"https://api.github.com/users/michaeldtaylor/events{/privacy}","received_events_url":"https://api.github.com/users/michaeldtaylor/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-03-10T15:03:44Z","updated_at":"2015-03-10T22:37:21Z","closed_at":null,"body":"Hi,\r\n\r\nWe're building an e-mail scanning tool and have had a few emails come to us with MIME attachments in the format:\r\n\r\n--001a11c2a080ffa4f305100f379e\r\nContent-Type: application/pdf; name=Test;\r\nContent-Disposition: attachment; filename=Test;\r\nContent-Transfer-Encoding: base64;\r\n\r\nWhen we load the email payload using MimeKit 1.0.9.0:\r\n\r\nMimeMessage.Load(...); // Load sample EML from embedded resource etc\r\n\r\nThe attachment is present, but the file name is null. If you add quotes:\r\n\r\n--001a11c2a080ffa4f305100f379e\r\nContent-Type: application/pdf; name=\"Test\";\r\nContent-Disposition: attachment; filename=\"Test\";\r\nContent-Transfer-Encoding: base64;\r\n\r\nThen the file name is \"Test\". I tried setting the various ParserOptions to Loose and nothing worked. Obviously we can work around this in our code, but clients like Thunderbird and Outlook show the attachments with their file names correctly without needing the quotes. I'm not sure if this is strictly a bug as I haven't studied to spec in depth, but seems like it can happen in the Wild (our example email was an document sent as attachment using Google Docs). We believe it might happen with the OS X mail client in certain situations too.\r\n\r\nIs this something you know about? Any plans to fix it?\r\n\r\nThanks,\r\n\r\nMichael Taylor"},"comment":{"url":"https://api.github.com/repos/jstedfast/MimeKit/issues/comments/78163770","html_url":"https://github.com/jstedfast/MimeKit/issues/106#issuecomment-78163770","issue_url":"https://api.github.com/repos/jstedfast/MimeKit/issues/106","id":78163770,"user":{"login":"jstedfast","id":338984,"avatar_url":"https://avatars.githubusercontent.com/u/338984?v=3","gravatar_id":"","url":"https://api.github.com/users/jstedfast","html_url":"https://github.com/jstedfast","followers_url":"https://api.github.com/users/jstedfast/followers","following_url":"https://api.github.com/users/jstedfast/following{/other_user}","gists_url":"https://api.github.com/users/jstedfast/gists{/gist_id}","starred_url":"https://api.github.com/users/jstedfast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jstedfast/subscriptions","organizations_url":"https://api.github.com/users/jstedfast/orgs","repos_url":"https://api.github.com/users/jstedfast/repos","events_url":"https://api.github.com/users/jstedfast/events{/privacy}","received_events_url":"https://api.github.com/users/jstedfast/received_events","type":"User","site_admin":false},"created_at":"2015-03-10T22:37:21Z","updated_at":"2015-03-10T22:37:21Z","body":"Does the header look something more like this?\r\n\r\n```\r\nContent-Type: application/pdf; name=filename with spaces.pdf;\r\nContent-Disposition: attachment; filename=filename with spaces.pdf;\r\nContent-Transfer-Encoding: base64;\r\n```\r\n\r\nIf so, the problem is because of the spaces which are strictly not allowed."}}