MAPI (Messaging Application Programming Interface) handles attachments by providing a mechanism for attaching files to email messages. MAPI applications can use the MAPI attachment object to add, retrieve, and delete attachments from an email message.
When an attachment is added to an email message, MAPI creates an attachment object in the message store and associates it with the email message. The attachment object contains the binary data of the attached file, as well as information about the attachment such as its file name, size, and MIME type.
MAPI also provides functions for accessing and manipulating attachment properties, such as setting the content type, encoding, and disposition of an attachment. It can also handle multipart messages containing multiple attachments, such as images or documents.
In summary, MAPI handles attachments by providing a standard mechanism for adding, managing, and manipulating them within email messages.