Updated the method add_attachment exchanging the method fileinfo by the mime_types