R. David Murray added the comment:

No, there is no requirement that attachment names be unique, and in fact no 
requirement that attachments (inline attachments, which is mostly what we are 
dealing with for 'related') have names at all.  I have seen messages in the 
wild that had more than one attachment with the same name, and it revealed a 
bug in the system I was working on at the time :)

Building the dictionary is not *hard*.  I am not satisfied with the code shown 
in 
 
  
https://docs.python.org/3/library/email-examples.html#examples-using-the-provisional-api

I think there should be a more elegant way to spell the multipart/related 
creation parts of that example.  Feeding a dictionary in as the entire 
'related' part would be better, but in order to create that dictionary you have 
to explicitly create MIMEPart subparts and store them in the dict.  That may be 
what we end up doing, but I think it would be nice if there was a more 
intuitive way to spell it.  

Especially since as it stands you have to explicitly munge the CIDs.  You 
shouldn't have to do that, the library should take care of that for you.

----------

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

Reply via email to