Class MIMEMessage() Professional
Class function of the MIMEMessage class
Instances of the MIMEMessage class encapsulate the complexities of the Multipurpose Internet Mail Extensions, a specification for formatting non-ASCII messages so that they can be sent over the Internet. MIMEMessage objects are used to retrieve e-mail messages in conjunction with a POP3Client() object, or to send e-mails with a SMTPClient() object. This means that MIMEMessage objects are of no use on their own, but help a programmer to create and/or examine MIME e-mail messages in a comfortable way.
A MIMEMessage object takes care of all elements of an e-mail, that is, sender, recipients, headers, content and file attachments. Therefore, a MIMEMessage object plays a central role for sending/receiving e-mails with Xbase++ applications.
The MIMEMessage class does not feature specific interfaces for accessing every header field which may be used in an e-mail message. However, the methods :getHeader() and :addHeader() provide a generalized way for reading and writing arbitrary header values, and can be used in cases where no specific interface exists.
The following code snippet illustrates accessing the recipient of a message, the recipient of a carbon copy ("Cc"), and the recipient of a blind copy ("Bcc") of the same message:
The maintenance of different (mime) parts of an e-mail is the task of the subclass MIMEContent().
The class MailAddress() is used for stting the recipient with the method :addRecipient() and for determining the sender with the method :getFrom().
Methods in this group are mainly used to examine the contents of an e-mail that is retrieved via oPOP3Client:getMessage(). This method returns a MIMEMessage object containing the different parts of an e-mail.
Methods in this group are usually called when an e-mail message is assembled in an Xbase++ application. The mail is then sent to a mail server via a SMTPClient object and its :send() method.
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.