mime {gmailr} | R Documentation |
These functions create a MIME message. They can be created atomically using 'mime()' or iteratively using the various accessors.
mime(..., attr = NULL, body = NULL, parts = list()) ## S3 method for class 'mime' to(x, vals, ...) ## S3 method for class 'mime' from(x, val, ...) ## S3 method for class 'mime' cc(x, vals, ...) ## S3 method for class 'mime' bcc(x, vals, ...) ## S3 method for class 'mime' subject(x, val, ...) text_body(mime, body, ...) html_body(mime, body, ...) attach_part(mime, part, ...) attach_file(mime, filename, type = NULL, ...)
... |
additional parameters to put in the attr field |
attr |
attributes to pass to the message |
body |
Message body. |
parts |
mime parts to pass to the message |
x |
the object whose fields you are setting |
vals |
one or more values to use, will be joined by commas |
val |
the value to set |
mime |
message. |
part |
Message part to attach |
filename |
name of file to attach |
type |
mime type of the attached file |
# using the field functions msg = mime() %>% from("james.f.hester@gmail.com") %>% to("asdf@asdf.com") %>% text_body("Test Message") # alternatively you can set the fields using mime(), however you have # to use properly formatted MIME names msg = mime(From="james.f.hester@gmail.com", To="asdf@asdf.com") %>% html_body("<b>Test<\b> Message")