User Tools

Site Tools


Sidebar

Network and communication

k24:k24.3:start

24.3.0 Component gb.mime

At https://de.wikipedia.org/wiki/Multipurpose_Internet_Mail_Extensions you will find this short description for MIME: “The Multipurpose Internet Mail Extensions (MIME) are extensions to the Internet standard RFC 822 (replaced by RFC 5322 since 2008), which defines the data format of e-mails. …).”

The gb.mime component by Benoît Minisini is based on the GMime library and has these three classes:

  • The Mime class provides you with two methods for encoding and decoding the contents of emails according to specific encoding procedures, as well as constants to define the encoding procedures.
  • The class MimePart represents a part in an EMail.
  • The class MimeMessage represents the source text of an EMail with its individual parts.

The properties and methods of the three classes of the component gb.mime are used

  • to generate the source text for the header and body of an email (→ Chapter 24.4.0) or
  • to split the source text of an EMail into the formal parts header and body (→ chapter 24.5.0).

Notes:

  • If you use the class SMTPClient (gb.net.smtp), the transferred data such as sender e-mail address(es), recipient e-mail address(es), subject or e-mail text are automatically prepared both in the header with its fields and in the body - including attachments (optional) - using internally the properties and methods of all classes of the component gb. mime are used internally → chapters 24.4.2, 24.4.3, 24.5.3 and 24.5.4. Therefore, you come into contact with the properties and methods of all classes of the component gb.mime only indirectly when using the class SMTPClient in practice.
  • If, on the other hand, you use the class POP3Client (gb.net.pop3), then the properties and methods of the three classes Mime, MimePart and MimeMessage will provide you with the necessary means to break an email loaded from the POP3 server into its parts. A good tool for structural analysis of the source text of an email can be found in the parser project in → chapter 24.3.2.
The website uses a temporary session cookie. This technically necessary cookie is deleted when the browser is closed. You can find information on cookies in our privacy policy.
k24/k24.3/start.txt · Last modified: 16.08.2022 (external edit)

Page Tools