Apparently in Rails you need to manually set the MIME-Type of attachments, otherwise their filesize, filetype and other Metadata are not properly recognized by the E-Mail client and images will not be displayed within the html e-mail.
In this case using the hash :mime_type and the corresponding value 'image/png' in the rails controller solved this problem:
attachments.inline["img.png"] = {:data => File.read('img.png'), :mime_type => 'image/png'}
Using json or yaml file structures to map your unstructured data would help you significantly, also another solution would be to use a NoSQL type database like MongoDB the third option would be using an online web service for your data like the Amazon Web Services S3 simple storage service
The question of managing unstructured data is very broad and impossible to answer with a definitive correct answer. NoSQL is different than relational databases but the data have some kind of structure. This structure is different than traditional relational databases but it is not correct to call them unstructured.
NoSQL is a whole new way of thinking about a database. NoSQL is not a relational database. The reality is that a relational database model may not be the best solution for all situations. The easiest way to think of NoSQL, is that of a database which does not adhering to the traditional relational database management system (RDMS) structure.