So, let's assume 2 incoming emails;
with different images
of the same name.
I guess your choices are;
a) store in different folders (one folder per email?)
b) rename incoming images - and tweak eml to point to new images
c) save images in a database, and extract when viewing the eml
Ultimately if you are making an email client then this sort of thing (not just with images, but any attachment) becomes important.