MDL-41956 implemented an API that allows to send file attachments with messages. The implementation was realized for badges only. The lang files announced also that it is implemented for Moodle internal mail attachments from forum posts. But this features were not implemented. MDL-42007 was closed as duplicate but not implemented.
It makes sense to add these features with Modle 2.7 now.