gmailr
gmailr copied to clipboard
Add an example setting the from field?
In the vignette about sending emails, could there be an example setting the From field to a name and an address as in this community forum post?
I.e. e.g.
text_msg <- gm_mime() %>%
gm_to("[email protected]") %>%
gm_from("Gmailr Fan <[email protected]>") %>%
gm_text_body("Gmailr is a very handy package!")
Sounds like a good idea to me!
Very related to #171
Yes, this sort of code results in a display name appearing if and only if the gm_from() address is actually the sending address (see gm_profile()):
text_msg <- gm_mime() %>%
gm_to("[email protected]") %>%
gm_from("Gmailr Fan <[email protected]>") %>%
gm_text_body("hello!")
If you aren't actually auth'ed as [email protected] then the gm_from() information is basically ignored.
So this shows how to do this on the fly, whereas #171 is about configuring settings or just having a better default.