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

Send mail/Drafts #5

Closed
lcolladotor opened this issue Sep 5, 2014 · 12 comments

Comments

@lcolladotor
Copy link

commented Sep 5, 2014

Hi,

Unless I missed it, I couldn't find a way in gmailr to create new emails. From https://developers.google.com/gmail/api/v1/reference/users/drafts/create it seems to me that the Google API does support creating new drafts. I don't know how hard it would be, but if something like a create_draft() function was added, then together with send_draft() we could send emails from gmailr. That would then open up to the use case that @kbroman talked about in his blog.

@kwbroman you should also check out https://t.co/11t6IA4bfQ

— Hadley Wickham (@hadleywickham) September 3, 2014
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>

Cheers,
Leo

@jimhester

This comment has been minimized.

Copy link
Member

commented Sep 5, 2014

You can actually send email directly using https://developers.google.com/gmail/api/v1/reference/users/messages/send API but you need to encode the body of the message as a RFC 2822 encoded string. I have not found an existing package to do this, but possibly one may exist. I believe this is also the API for the drafts as well, from looking at it just now.

This was a known limitation when I released the package, I should put a mention of it somewhere as it is (obviously) an expected feature to be able to send email :)

@jimhester jimhester changed the title create_draft() request Send mail/Drafts Sep 5, 2014

@jimhester

This comment has been minimized.

Copy link
Member

commented Sep 5, 2014

Looking at http://en.wikipedia.org/wiki/MIME and the sendmailR package this shouldn't be as hard as I originally thought.

jimhester added a commit that referenced this issue Sep 8, 2014

Add mime_message function
This can be used to create a new gmail draft from a character vector.
Still needs more features to fully address #5
@jimhester

This comment has been minimized.

Copy link
Member

commented Sep 15, 2014

We can now send mime text and html messages with attachments. I just need to clean up the documentation and this can be completely closed.

@jimhester

This comment has been minimized.

Copy link
Member

commented Sep 15, 2014

This is for the vast majority of cases now working see https://github.com/jimhester/gmailr/blob/master/vignettes/sending_messages.Rmd for example usage.

@jimhester jimhester closed this Sep 15, 2014

@lcolladotor

This comment has been minimized.

Copy link
Author

commented Sep 16, 2014

Awesome, great work!

@lcolladotor

This comment has been minimized.

Copy link
Author

commented Sep 16, 2014

@ncarchedi This should make gmailr usable for your use case, no?

@lcolladotor

This comment has been minimized.

Copy link
Author

commented Sep 16, 2014

@jimhester I am just a bit curious as to why you don't bump the version number of gmailr after adding/fixing new functionality? There was a long discussion about this in the Bioconductor-devel mailing list https://stat.ethz.ch/pipermail/bioc-devel/2014-September/006193.html and at some point several pointed out that "version numbers are cheap".

@jimhester

This comment has been minimized.

Copy link
Member

commented Sep 16, 2014

I will increment the version number when I send a new release to CRAN, no
point in doing it before that, you can just version by the commit hash if
you are installing from github.

On Tue, Sep 16, 2014 at 11:57 AM, Leonardo Collado-Torres <
notifications@github.com> wrote:

@jimhester https://github.com/jimhester I am just a bit curious as to
why you don't bump the version number of gmailr after adding/fixing new
functionality? There was a long discussion about this in the
Bioconductor-devel mailing list
https://stat.ethz.ch/pipermail/bioc-devel/2014-September/006193.html and
at some point several pointed out that "version numbers are cheap".


Reply to this email directly or view it on GitHub
#5 (comment).

@lcolladotor

This comment has been minimized.

Copy link
Author

commented Sep 16, 2014

I understand that. But well, it makes it hard to track what version a user has installed from the sessionInfo() output.

@jimhester

This comment has been minimized.

Copy link
Member

commented Sep 16, 2014

not if they use devtools::session_info() 😃

@lcolladotor

This comment has been minimized.

Copy link
Author

commented Sep 16, 2014

Haha, nice!

@sanjmeh

This comment has been minimized.

Copy link

commented Mar 30, 2019

@jimhester & @jennybc , this appears a really old post but I am still facing problems in send_draft() and attach_part() functions... and many more. Seems either we have not moved on the package or CRAN is not updated. I have version 0.7.1 from CRAN.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.