the problem, when attaching a mime part from a memory region, is to determine the mime headers respectively mime type of the attachment.
When attaching mime parts from files, libcmime will look up necessary informations using the „file“
binary and encodes the data to base64. At the moment there is no code in libcmime to classify
the mime type of data.
A solution could be a new function (e.g. cmime_part_from_memory) which writes the memory to a temporary
file, which would be processed by cmime_part_from_file(). This would just be a convenience function for the user,
to not write a temporary file by self.