Class MIMEContent() Professional
Class function of the MIMEContent class.
The MIMEContent class provides services for inspecting the contents of an e-mail when it is retrieved from a POP3 server via a POP3Client object. Therefore, MIMEContent objects are usually not created via the :new() method but are retrieved from a MIMEMessage object that represents the retrieved e-mail message. The general programming pattern for this is as follows:
The contents of a simple e-mail message contain simply the character string of the e-mail body, plus the content-type and the content-transfer-encoding used to encode the text. However, an e-mail may be comprised of multiple parts containing not only the text but also file attachments, for example. An e-mail is then transferred as a multi-part message, and each part may also contain multi-part content. Therefore, the contents of an e-mail message is always returned as an array of MIMEContent objects which must be inspected individually in order to obtain all parts of an e-mail message.
In case of multi-part messages, a content can be one of three types. If it contains binary information to be attached to the e-mail, then the contents is usually added as mixed type. An example for a binary attachment is an image or a file.
If the content type of an e-mail is "text/html", the html part may reference images that can be added as a related content type.
In case the content of an e-mail is of type "text/html", a content of type "text/plain" can be added as alternative content. This way, the mail can also be read by e-mail readers that cannot display html pages.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.