-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cannot send mail #32
Comments
OK I re-installed but get much the same result. suppressPackageStartupMessages(library(gmailr))
suppressPackageStartupMessages(library(dplyr))
text_msg <- mime() %>%
to("jenny@stat.ubc.ca") %>%
from("jenny@stat.ubc.ca") %>%
text_body("default credentials, to and from jenny@stat.ubc.ca")
ret <- text_msg %>%
send_message()
#> Error in the$last_response <<- content(req, "parsed"): cannot change value of locked binding for 'the'
#> Error in gmailr_query(POST, location, user_id, class, ...): cannot change value of locked binding for '.last_response'
## try the example from send_message()
send_message(mime(from="jenny@stat.ubc.ca", to="jenny@stat.ubc.ca",
subject="hello", "how are you doing?"))
#> Error in the$last_response <<- content(req, "parsed"): cannot change value of locked binding for 'the'
#> Error in gmailr_query(POST, location, user_id, class, ...): cannot change value of locked binding for '.last_response'
devtools::session_info("gmailr")
#> Session info --------------------------------------------------------------
#> setting value
#> version R version 3.2.2 (2015-08-14)
#> system x86_64, darwin13.4.0
#> ui RStudio (0.99.747)
#> language (EN)
#> collate en_US.UTF-8
#> tz America/Vancouver
#> date 2015-11-02
#> Packages ------------------------------------------------------------------
#> package * version date source
#> argufy 1.0.0 2015-11-02 Github (gaborcsardi/argufy@f7cfeef)
#> base64enc 0.1-3 2015-07-28 CRAN (R 3.2.0)
#> curl 0.9.3 2015-08-25 CRAN (R 3.2.0)
#> digest 0.6.8 2014-12-31 CRAN (R 3.2.0)
#> gmailr * 0.6.0 2015-11-02 Github (jimhester/gmailr@dcec99a)
#> httr 1.0.0 2015-06-25 CRAN (R 3.2.0)
#> jsonlite 0.9.17 2015-09-06 CRAN (R 3.2.0)
#> magrittr 1.5 2014-11-22 CRAN (R 3.2.0)
#> mime 0.4 2015-09-03 CRAN (R 3.2.0)
#> R6 2.1.1 2015-08-19 CRAN (R 3.2.0)
#> stringi 1.0-1 2015-10-22 CRAN (R 3.2.0)
#> stringr 1.0.0.9000 2015-10-27 Github (hadley/stringr@3813041) |
Should be fixed now, I was using the wrong assignment operator. |
Progress but still no joy. Sorry about all this but I'd really like to use the dev version instead of CRAN! I think the first error is because the scope defaults to "read_only" even though I'm asking to send a message. But then, even once I've authorized the "compose" scope, it seems we're back to that 400 bad request from a while ago? suppressPackageStartupMessages(library(gmailr))
suppressPackageStartupMessages(library(dplyr))
send_message(mime(from="jenny@stat.ubc.ca", to="jenny@stat.ubc.ca",
subject="hello", "how are you doing?"))
#> Use a local file to cache OAuth access credentials between R sessions?
#> 1: Yes
#> 2: No
#>
#> Selection: 1
#> Waiting for authentication in browser...
#> Press Esc/Ctrl + C to abort
#> Authentication complete.
#> Error in gmailr_query(POST, location, user_id, class, ...) :
#> client error: (403) Forbidden
gmail_auth(scope = "compose")
#> Waiting for authentication in browser...
#> Press Esc/Ctrl + C to abort
#> Authentication complete.
send_message(mime(from="jenny@stat.ubc.ca", to="jenny@stat.ubc.ca",
subject="hello", "how are you doing?"))
#> Error in gmailr_query(POST, location, user_id, class, ...): client error: (400) Bad Request
text_msg <- mime() %>%
to("jenny@stat.ubc.ca") %>%
from("jenny@stat.ubc.ca") %>%
text_body("default credentials, to and from jenny@stat.ubc.ca")
ret <- text_msg %>%
send_message()
#> Error in gmailr_query(POST, location, user_id, class, ...): client error: (400) Bad Request
devtools::session_info("gmailr")
#> Session info --------------------------------------------------------------
#> setting value
#> version R version 3.2.2 (2015-08-14)
#> system x86_64, darwin13.4.0
#> ui RStudio (0.99.747)
#> language (EN)
#> collate en_US.UTF-8
#> tz America/Vancouver
#> date 2015-11-02
#> Packages ------------------------------------------------------------------
#> package * version date source
#> argufy 1.0.0 2015-11-02 Github (gaborcsardi/argufy@f7cfeef)
#> base64enc 0.1-3 2015-07-28 CRAN (R 3.2.0)
#> curl 0.9.3 2015-08-25 CRAN (R 3.2.0)
#> digest 0.6.8 2014-12-31 CRAN (R 3.2.0)
#> gmailr * 0.6.0 2015-11-02 Github (jimhester/gmailr@c834010)
#> httr 1.0.0 2015-06-25 CRAN (R 3.2.0)
#> jsonlite 0.9.17 2015-09-06 CRAN (R 3.2.0)
#> magrittr 1.5 2014-11-22 CRAN (R 3.2.0)
#> mime 0.4 2015-09-03 CRAN (R 3.2.0)
#> R6 2.1.1 2015-08-19 CRAN (R 3.2.0)
#> stringi 1.0-1 2015-10-22 CRAN (R 3.2.0)
#> stringr 1.0.0.9000 2015-10-27 Github (hadley/stringr@3813041) I sent my most recent batch of email last night with the CRAN version, so I can give this a rest for another week or too and come back 😬. |
For my class, I've been using the CRAN version but thought I'd try dev version today. But I cannot seem to send mail. Below I'm using your built-in global project (although I don't when sending course email for real), and have already cached an auth token in working directory here.
The text was updated successfully, but these errors were encountered: