Learn R Programming

gmailr (version 0.6.0)

body: Get the body text of a message or draft

Description

Get the body text of a message or draft

Usage

body(x, ...)

## S3 method for class 'gmail_message': body(x, type = "text/plain", collapse = FALSE, ...)

## S3 method for class 'gmail_draft': body(x, ...)

Arguments

x
the object from which to retrieve the body
...
other parameters passed to methods
type
the content type of the body to return (for multipart messages), if NULL returns all types.
collapse
if `FALSE` will return each formatted body in list, if `TRUE` will collapse them together

Examples

Run this code
body(my_message)
body(my_draft)

Run the code above in your browser using DataLab