Add the String to the Part
Add the string to the MIME part using the setBody() function. This function sets the body of the MIME part to the provided string. For example:
 
RWCString messageBody;
 
// ... fill messageBody with data, convert to canonical form if
// necessary, encode if necessary.
 
RWMimePart message;
message.setBody(messageBody);
For a MIME part with simple content, the setBody() function does not process the provided string at all. The programmer is responsible for making sure that the headers of the part accurately describe the content in the string.