I'm basically wondering how to make a gmailr message look like it was sent from gmail.com. Currently the font is fixed width, the from field contains just the address, and the signature is missing. Is there a way to change those things? Thanks!
Hi @EconomiCurtis, thanks for the suggestion. Replacing text_body with html_body does replace fixed-width font with normal-looking font, but when I send this with send_message, I still don't get the gmail signature coming through, and neither the gmail-specified from name nor the name I specify in from; instead the address itself appears in the from field. Any ideas? Thanks.
From my experience using the gmailr package, there aren't helper functions that would help you achieve this. I'd say your best bet is to hit the gmail API (if that's even a thing) docs.
I also don't get my gmail signature when sending an email via gmailr either. But that wasn't surprising. For example, when I send a gmail-email from my phone's email application, the signature is the one I set up on the phone, not the gmail signature. I think the I'd only expect that gmail signature when using a gmail application. Also, knowing that your gmail signature isn't included in gmailr email, you can obviously just include it yourself in the mine.
I had success with to and from names like so (obviously replacing the from email with the correct address),
email <- mime() %>%
to("'Mom' <mother@gmail.com>") %>%
from("'ME' <fakus.namus@gmail.com>") %>%
subject("Gmailr is a very handy package!") %>%
html_body("And I sure do <b>like it</b>.")
Thanks, Curtis. That trick for the from field works for me, though the single quotes come through and are unnecessary, so I use from("ME <fakus.namus@gmail.com>"). The signature part makes sense, and right, it's easy enough to add manually. Thanks for the help.