gmailr | Access the Gmail RESTful API from R | Email library
kandi X-RAY | gmailr Summary
kandi X-RAY | gmailr Summary
Exposing the Gmail API from R.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of gmailr
gmailr Key Features
gmailr Examples and Code Snippets
Community Discussions
Trending Discussions on gmailr
QUESTION
I've created a script in R that scrapes our clients' websites robots.txt files, checks if they've changed since the last check, and uses the GmailR package to send me an e-mail if they have.
The purpose of this script is to run in the background on a schedule. Which works -- for a couple of days. Then GmailR decides that it needs to be reauthenticated, and, when Task Scheduler is running this script in the background, it just quietly errors out instead of asking me to reauthenticate.
Is anyone familiar with a way to either stay authenticated in GmailR or an alternative e-mail package that doesn't require authentication?
Here's the script I'm using for authentication:
...ANSWER
Answered 2022-Mar-14 at 18:48You can try this. As I know it requires reverification when you change gmail account - json file.
QUESTION
I need some shiny wisdom, please. Below code works well in shiny
server
part; it sends an e-mail when user clicks actionButton("mailButton", "e-mail!")
in ui
part with a PDF report attached via gmailr
. The only problem I have is that there is no feedback to the user whether e-mail has been sent. What I would ideally like to have is a message box mid-screen (maybe with overlay). When e-mail is sent it would tell so to the user who pressed the input$mailButton
(and maybe the box would disappear with timeout of 15 seconds). This event approximately should correspond to the point of print("message sent")
in the below code (this does get printed to the terminal). What would be a good way to do display user a confirmation that e-mail has indeed been sent and block inputs while sending is going on (which usually takes 4 seconds)?
ANSWER
Answered 2020-Nov-22 at 05:57This seems like a good use case of withProgress()
and showNotification()
:
QUESTION
I have been trying to send 2 images(have to add these in the mail body) and 2 attachments(2 excel files) in one email using the GmailR package but I've not been able to figure it out so far. I've already looked at the syntax from the documentation and this vignette - https://cran.r-project.org/web/packages/gmailr/vignettes/sending_messages.html
Based on the vignette above I've tried a combination of things mentioned in the vignette(attachment and image sections)to add two images in the mail body + two separate xlsx files. It works perfectly fine when I try to send one image/one attachment (as mentioned in the vignetter) but fails to take more than one image/attachment.
...ANSWER
Answered 2020-Oct-30 at 10:51Turns out, we just had to pipe in the subcommands again!
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install gmailr
In order to use gmailr you will need to create a google project for it. The easiest way to do this is via the Python Quickstart. Only very heavy usage of the Gmail API requires payment, so use of the API for most people should be free.
Click the Enable the Gmail API button.
In the resulting dialog click the DOWNLOAD CLIENT CONFIGURATION on your computer.
Tell gmailr where the JSON lives, by doing one of the two things Call gm_auth_configure(path = "path/to/downloaded/json") Set the GMAILR_APP environment variable to the location of the JSON file, it is convienent to do this in your .Renviron file with usethis::edit_r_environ(). Then calling gm_auth_configure() with no arguments.
Call gm_auth() to start the OAuth flow to verify to google that you would like your gmailr project to have access to your email. You will get a scary warning about an untrusted application, this is because the application is the one you just created, click advanced and Go to gmailr to proceed to do the oauth flow.
If you want to authenticate with fewer scopes than the default use the scopes parameter to gm_auth(). You can see a full list of available scopes from gm_scopes().
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page