{"action":"closed","issue":{"url":"https://api.github.com/repos/swiftmailer/swiftmailer/issues/742","repository_url":"https://api.github.com/repos/swiftmailer/swiftmailer","labels_url":"https://api.github.com/repos/swiftmailer/swiftmailer/issues/742/labels{/name}","comments_url":"https://api.github.com/repos/swiftmailer/swiftmailer/issues/742/comments","events_url":"https://api.github.com/repos/swiftmailer/swiftmailer/issues/742/events","html_url":"https://github.com/swiftmailer/swiftmailer/issues/742","id":144654294,"number":742,"title":"Mime Boundary not correct","user":{"login":"yepher","id":1359331,"avatar_url":"https://avatars3.githubusercontent.com/u/1359331?v=4","gravatar_id":"","url":"https://api.github.com/users/yepher","html_url":"https://github.com/yepher","followers_url":"https://api.github.com/users/yepher/followers","following_url":"https://api.github.com/users/yepher/following{/other_user}","gists_url":"https://api.github.com/users/yepher/gists{/gist_id}","starred_url":"https://api.github.com/users/yepher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yepher/subscriptions","organizations_url":"https://api.github.com/users/yepher/orgs","repos_url":"https://api.github.com/users/yepher/repos","events_url":"https://api.github.com/users/yepher/events{/privacy}","received_events_url":"https://api.github.com/users/yepher/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-03-30T17:04:54Z","updated_at":"2018-03-12T22:31:46Z","closed_at":"2018-03-12T22:31:46Z","author_association":"NONE","body":"Hi I'm from https://www.sparkpost.com/ and noticed something with SwiftMailer MIME boundary.\n\nSwiftMailer produces a mime boundary [here](https://github.com/swiftmailer/swiftmailer/blob/5.x/lib/classes/Swift/Mime/SimpleMimeEntity.php#L412) \nThe _interesting_ thing is it uses `=` as part of the characters in the boundary  #sequence.\n\nAccording to RFC2046 `_` and `=` are valid in mime boundary\nSee: https://tools.ietf.org/html/rfc2046\n\n```\nboundary := 0*69<bchars> bcharsnospace\n\n     bchars := bcharsnospace / \" \"\n\n     bcharsnospace := DIGIT / ALPHA / \"'\" / \"(\" / \")\" /\n                      \"+\" / \"_\" / \",\" / \"-\" / \".\" /\n                      \"/\" / \":\" / \"=\" / \"?\"\n```\n\nThe multi-parts message spec is not specific on whether the boundary value should be quoted or not, and it does say that some non-alphanumeric characters/punctuations are legal. However, if not in quotes, the presence of some of the non-alphanumeric characters does break other RFCs concerning header field (e.g. RFC2822, RFC2045). So, if, e.g. there will be '=' or '-' or ' ' (whitespace) or ';' etc. among the boundary value, code should add quotes around it. Overall, it's a good practice that the boundary be treated just as attributes of other headers - always quote it, so that a clean attribute=value pair can be identified.\n\nIt is helpful to search RFC2046 for `boundary=` and note that simple boundary are not quoted but anytime a non [a-z][A-Z][0-9] character is used the boundary is quoted.\n\nIn testing this causes intermittent problems when sending attachments.\n\nI propose remove `=` from boundary (to make things more reliable) and quote the boundary sequence so it will appear like this:\n\nContent-Type: multipart/alternative; boundary=\"_X_swift_v4_1458901746_7c7276005fa2659f6ddd6a4e60f7ccea_X_\"\n"}}
{"actor":{"display_login":"fabpot"}}