I've got the same problem (OS X 10.11.4) and it does not appear to be a problem with the HTML formatting (forgetting to close tags, etc). Nor is the messages cut off after a specific number of characters. However, it does always cut off the same number of characters (14) from the end, even though the messages have different lengths. When the final line is --ContainerMixedBoundary-- (specifying the end of the attachment container), it will cut it off to --ContainerM, botching the rendering of the entire message. In my case, all the messages have the same basic format, always including a bin-hexed image attachment and ending with the same "ContainerMixedBoundary" marker. Some get cut off, some do not (about 1 out of every 7-10 overall, but it's not consistent).
For reference, here's the end of message 1, which renders fine:
1UgHEW0DWGjZ5WVCBVVJrX2yY+mOSsHbgOig1698otDISqrz4j4u43PfGyrCV8t6tIKtRdu5xq+X
tT5hCvzYEEffk19UhXhEYYKOQANKg/qyuNuGDMACenc74FYivlvUiORTbpsanFB5cvBt1Phku4US
nVj1p9oDKXmu5XkoO1d2+jFWNxeXbj/d3wLSqkUJwUuhrH0JJ7kjt9GHDxXBcFTxjO++/wBwy6Sg
cvA7gCpNO2BX/9k=
--HTMLWrapperRelatedBoundary--
--ContainerMixedBoundary--
And here's the end of message 2, which is cut off and does not render fine in Apple Mail OS X, but does render fine everywhere else (iOS Mail, GMail, Yahoo Mail):
tO7UyCRgZG5A7ivUfLH+lGifCSyjqTWuJTSVKyOOJQkIwBIIP82KMvJhwcqWXqOnTocKqFTErKuy
v1H2jXHxKoUFlCkDeTfv4ZioRub9EoOZ8fHGpIXl+BwYq0ZCPxGKEQsUbEMG3XoO1R0ribRvI1W2
oe3fFjIvpcUCq1epAqcTEdKjbiDv9OKVORD6gWQhx4U6D3wk81qQsCnoCaEeFBkgoqbNUsR+Hhkf
8zrVYDv1Ox6YqGOqMUUZQXFVGBk2oxRRlKMVUYpt/9k=
--HTMLWrapperRelatedBoundary--
--ContainerM
Again, these messages all share the same basic format and are generated by the same code, with the same tags and boundaries, the only difference is the content text between tags, and the image attachment data.
In fact, the problem appears in the Sent messages in Apple Mail OS X (which was not sent from Apple Mail, but through Gmail via code), but the same message, when received elsewhere, is fine. So the cut-off appears to be happening internally in Apple Mail and is not a problem with the message itself.
探讨了在苹果邮件OSX客户端中发送特定格式的HTML邮件时遇到的问题,邮件末尾总是被截断相同数量的字符,导致消息无法正确渲染。

606

被折叠的 条评论
为什么被折叠?



