gmailR
gmailR copied to clipboard
problem with gmail function
Hi,
I try to run the code:
gmailR::gmail( to = "mail", subject = "Test", password = "password", message = "Attached file", attachment = "attachment", username = "mail" )
but I get an error message:
Error in match(x, table, nomatch = 0L) : object 'cell.ext' not found.
I tried to look into the function and it looks like the problem is in this part: cells <- sapply(strsplit(to, "@"), function(x) x[2]) %in% cell.ext[, 2]
Can you help me? Thank you,
Marco
No clue I just used the same set up and all went well. Try loading the package.
The package isn't maintained any more as there are better options including Jim Hester's gmailr package on CRAN https://cran.r-project.org/web/packages/gmailr/index.html
Cool, but I find it hard to send attachments with this package. I tried:
html_msg <- mime() %>% to("[email protected]") %>% from("[email protected]") %>% subject("Test") %>% html_body("Gmailr is a very handy package!") %>% attach_file("file.pdf") #html message
ret_val <- send_message(html_msg) #send message ret_val$status_code
but I receive a bounce email.
You know how to attach files? Thanks for helping me there are no many resources on this topic in the web.
For my package...Did you load the package with library? That data set may not be available otherwise. Bad coding on my part.
You could ask Hester about gmailr directly for the code you demoed.