R. David Murray added the comment:

When you say the attachment is not detected, what do you mean?  What call are 
you making to the email library that you are expecting to see the attachment in 
that it is not in?  Your 'parsed' pastebin isn't something the library 
produces, so I assume that's the Tika output.

(By the way, pastbin links are problematic in tracker issues, since they may 
expire.  Please paste directly in to the issue, or attach files to the issue.)

Oh, wait.  Looking at the email I think I see the problem:

----------------------------------------
</BODY>
</HTML>

--51a14337d8625bb8ce4a5b1667f--

--51a14337d8625bb8ce4a5b1667f
<attachment content>
----------------------------------------

That line that ends with '--' signals the end of the last MIME part in the 
message.  So by RFC standards the remainder of the message is part of the 
'epilogue'.  If you check msg.epilogue I think you'll find that it contains the 
raw text of the remainder of the message.

It is interesting that your email client treats it as an actual attachment.  It 
would be possible to have the email library recognize such out of place mime 
dividers and register it as an error.  I would review a patch for that if 
someone wants to propose one.

--David

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27010>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to