Skip to content
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

problem with gmail function #10

Open
marco-vene opened this issue Mar 25, 2016 · 3 comments
Open

problem with gmail function #10

marco-vene opened this issue Mar 25, 2016 · 3 comments

Comments

@marco-vene
Copy link

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

@trinker
Copy link
Owner

trinker commented Mar 25, 2016

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

@marco-vene
Copy link
Author

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.

@trinker
Copy link
Owner

trinker commented Mar 26, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants