# using the field functions
msg = gm_mime() %>%
gm_from("james.f.hester@gmail.com") %>%
gm_to("asdf@asdf.com") %>%
gm_text_body("Test Message")
# alternatively you can set the fields using gm_mime(), however you have
# to use properly formatted MIME names
msg = gm_mime(From="james.f.hester@gmail.com",
To="asdf@asdf.com") %>%
gm_html_body("Test<\b> Message")
Run the code above in your browser using DataLab