Setting the message body |
To set the body of an email message invoke the EmailMessage#setBody method providing the body of the message as an argument. Paragraph breaks in the message body are represented by a carriage return line feed CRLF using the escape characters \r\n. Optionally you can set the body of the message from the contents of a file.
Example
// set the message body using a string message.setBody("Go over status of project.\r\nThanks\r\nBob");
Example
// set the message body using contents of a file File f = new File("message.txt"); message.setBody(f);
See also
Setting the message body using non US-ASCII data |