gmailR icon indicating copy to clipboard operation
gmailR copied to clipboard

problem with gmail function

Open marco-vene opened this issue 8 years ago • 3 comments

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

marco-vene avatar Mar 25 '16 19:03 marco-vene

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

trinker avatar Mar 25 '16 21:03 trinker

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.

marco-vene avatar Mar 26 '16 14:03 marco-vene

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.

trinker avatar Mar 26 '16 17:03 trinker