{"action":"created","issue":{"url":"https://api.github.com/repos/jimhester/gmailr/issues/30","labels_url":"https://api.github.com/repos/jimhester/gmailr/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/jimhester/gmailr/issues/30/comments","events_url":"https://api.github.com/repos/jimhester/gmailr/issues/30/events","html_url":"https://github.com/jimhester/gmailr/issues/30","id":109939859,"number":30,"title":"Unable to send mail","user":{"login":"jennybc","id":599454,"avatar_url":"https://avatars.githubusercontent.com/u/599454?v=3","gravatar_id":"","url":"https://api.github.com/users/jennybc","html_url":"https://github.com/jennybc","followers_url":"https://api.github.com/users/jennybc/followers","following_url":"https://api.github.com/users/jennybc/following{/other_user}","gists_url":"https://api.github.com/users/jennybc/gists{/gist_id}","starred_url":"https://api.github.com/users/jennybc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jennybc/subscriptions","organizations_url":"https://api.github.com/users/jennybc/orgs","repos_url":"https://api.github.com/users/jennybc/repos","events_url":"https://api.github.com/users/jennybc/events{/privacy}","received_events_url":"https://api.github.com/users/jennybc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-10-06T05:54:45Z","updated_at":"2015-10-06T22:40:32Z","closed_at":null,"body":"I've tried everything I know, ranging from creating a new Project (w/ new secret and key) to installing from GitHub and using the built-in defaults. Before I provide a detailed example: are you able to send a test email with `gmailr` these days? I am wondering if it is a transient problem with the Gmail API, although I see no external evidence of that. BTW the \"Download JSON\" feature is not working in Developers Console right now, although I believe I know how to workaround that.\r\n\r\nUsing the CRAN version with my own secret and ID, I am getting `Error in send_message(test_email) : client error: (400) Bad Request`. Installling from GitHub and using my own or built-in default credentials, I am getting: `Error: length(url) == 1 is not TRUE`.\r\n\r\nAny idea what I'm bumping up against? Do you recommend I use the CRAN version or GitHub version and, if GitHub, which SHA?"},"comment":{"url":"https://api.github.com/repos/jimhester/gmailr/issues/comments/146022685","html_url":"https://github.com/jimhester/gmailr/issues/30#issuecomment-146022685","issue_url":"https://api.github.com/repos/jimhester/gmailr/issues/30","id":146022685,"user":{"login":"jennybc","id":599454,"avatar_url":"https://avatars.githubusercontent.com/u/599454?v=3","gravatar_id":"","url":"https://api.github.com/users/jennybc","html_url":"https://github.com/jennybc","followers_url":"https://api.github.com/users/jennybc/followers","following_url":"https://api.github.com/users/jennybc/following{/other_user}","gists_url":"https://api.github.com/users/jennybc/gists{/gist_id}","starred_url":"https://api.github.com/users/jennybc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jennybc/subscriptions","organizations_url":"https://api.github.com/users/jennybc/orgs","repos_url":"https://api.github.com/users/jennybc/repos","events_url":"https://api.github.com/users/jennybc/events{/privacy}","received_events_url":"https://api.github.com/users/jennybc/received_events","type":"User","site_admin":false},"created_at":"2015-10-06T22:40:32Z","updated_at":"2015-10-06T22:40:32Z","body":"I re-installed from GitHub. Now I get this:\r\n\r\n``` r\r\nlibrary(gmailr)\r\nclear_token()\r\ngmail_auth(id = \"xxxx.apps.googleusercontent.com\",\r\n           secret = \"xxxx\", scope = \"full\")\r\n#> Waiting for authentication in browser...\r\n#> Press Esc/Ctrl + C to abort\r\n#> Authentication complete.\r\nm <- mime(To = 'jenny@stat.ubc.ca', From = 'gspreadr@gmail.com', body = 'hi')\r\ncreate_draft(m)\r\n#> [1] \"Id: r-6087211331919750203\\nTo: \\nFrom: \\nDate: \\nSubject: \\n\"\r\nsend_message(m)\r\n#> Error: as.character(mail) is not TRUE\r\nsession_info(\"gmailr\")\r\n#> Session info --------------------------------------------------------------\r\n#>  setting  value                       \r\n#>  version  R version 3.2.2 (2015-08-14)\r\n#>  system   x86_64, darwin13.4.0        \r\n#>  ui       RStudio (0.99.700)          \r\n#>  language (EN)                        \r\n#>  collate  en_US.UTF-8                 \r\n#>  tz       America/Vancouver           \r\n#>  date     2015-10-06\r\n#> Packages ------------------------------------------------------------------\r\n#>  package   * version date       source                           \r\n#>  base64enc   0.1-3   2015-07-28 CRAN (R 3.2.0)                   \r\n#>  curl        0.9.3   2015-08-25 CRAN (R 3.2.0)                   \r\n#>  digest      0.6.8   2014-12-31 CRAN (R 3.2.0)                   \r\n#>  gmailr    * 0.6.0   2015-10-06 Github (jimhester/gmailr@056d622)\r\n#>  httr        1.0.0   2015-06-25 CRAN (R 3.2.0)                   \r\n#>  jsonlite    0.9.17  2015-09-06 CRAN (R 3.2.0)                   \r\n#>  magrittr    1.5     2014-11-22 CRAN (R 3.2.0)                   \r\n#>  mime        0.4     2015-09-03 CRAN (R 3.2.0)                   \r\n#>  R6          2.1.1   2015-08-19 CRAN (R 3.2.0)                   \r\n#>  stringi     0.5-5   2015-06-29 CRAN (R 3.2.0)                   \r\n#>  stringr     1.0.0   2015-04-30 CRAN (R 3.2.0)\r\n```\r\n\r\nIt did just occur to me that perhaps the `from` address **must** be a gmail address. Is that true? Because I'm embarrassed to say that's what I've always done in the past, but today I was trying to use my usual email in `from`. I'm about to re-install from CRAN and try again with a gmail `from` address."}}