{"id":13736539,"url":"https://github.com/feddelegrand7/mailtoR","last_synced_at":"2025-05-08T12:33:04.547Z","repository":{"id":56143117,"uuid":"273383908","full_name":"feddelegrand7/mailtoR","owner":"feddelegrand7","description":"🐹🐹🐹 Creates a Friendly User Interface for Emails Sending in Shiny and RMarkdown","archived":false,"fork":false,"pushed_at":"2020-12-09T21:55:47.000Z","size":3134,"stargazers_count":22,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-12T23:12:41.219Z","etag":null,"topics":["badge","cran","javascript","metacran-downloads","rmarkdo","rmarkdown","rstats","shiny","webdesign"],"latest_commit_sha":null,"homepage":"https://ihaddadenfodil.com/post/sending-emails-should-be-easier-in-rmarkdown/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/feddelegrand7.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"custom":["https://www.buymeacoffee.com/Fodil"]}},"created_at":"2020-06-19T02:14:26.000Z","updated_at":"2023-07-24T10:00:35.000Z","dependencies_parsed_at":"2022-08-15T13:31:04.453Z","dependency_job_id":null,"html_url":"https://github.com/feddelegrand7/mailtoR","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feddelegrand7%2FmailtoR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feddelegrand7%2FmailtoR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feddelegrand7%2FmailtoR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/feddelegrand7%2FmailtoR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/feddelegrand7","download_url":"https://codeload.github.com/feddelegrand7/mailtoR/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224732129,"owners_count":17360416,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["badge","cran","javascript","metacran-downloads","rmarkdo","rmarkdown","rstats","shiny","webdesign"],"created_at":"2024-08-03T03:01:23.688Z","updated_at":"2024-11-15T04:32:01.386Z","avatar_url":"https://github.com/feddelegrand7.png","language":"R","funding_links":["https://www.buymeacoffee.com/Fodil"],"categories":["R","Backend"],"sub_categories":["Notification Integration"],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# mailtoR\n\n\u003c!-- badges: start --\u003e\n\n[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/mailtoR)](https://cran.r-project.org/package=mailtoR)\n\n[![CRAN_time_from_release](https://www.r-pkg.org/badges/ago/mailtoR)](https://cran.r-project.org/package=mailtoR)\n\n[![metacran downloads](https://cranlogs.r-pkg.org/badges/mailtoR)](https://cran.r-project.org/package=mailtoR)\n\n[![metacran downloads](https://cranlogs.r-pkg.org/badges/grand-total/mailtoR)](https://cran.r-project.org/package=mailtoR)\n\n[![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://choosealicense.com/licenses/mit/)\n\n[![Travis build status](https://travis-ci.com/feddelegrand7/mailtoR.svg?branch=master)](https://travis-ci.com/feddelegrand7/mailtoR)\n\n[![R badge](https://img.shields.io/badge/Build%20with-♥%20and%20R-pink)](https://github.com/feddelegrand7/mailtoR)\n\n\n\n\u003c!-- badges: end --\u003e\n\nThe goal of `mailtoR` is to implement a personalized user interface for emails sending within your Shiny applications and/or RMarkdown documents. It's a wrapper of the [Mailtoui](https://mailtoui.com/#menu) JavaScript library. \n\n## Installation\n\nYou can install the `mailtoR` package from [CRAN](https://CRAN.R-project.org/package=mailtoR) with: \n\n\n```{r, eval=FALSE}\n\ninstall.packages(\"mailtoR\")\n\n```\n\n\n\nYou can install the development version of `mailtoR` from Github with: \n\n```{r, eval=FALSE}\n\n# install.packages(\"remotes\")\n\nremotes::install_github(\"feddelegrand7/mailtoR\")\n\n\n\n```\n\n\n## How to use the package \n\n\nThe `mailtoR` package is composed of two functions: \n\n+ `use_mailtoR()`: put this function __at the end of your Shiny ui__, it activates the features of the [Mailtoui](https://mailtoui.com/#menu) library;\n\n+ `mailtoR()`: use this function to create as many email links as you want (see examples below)\n\n\n#### The following examples are provided in Shiny coding however the principles remain the same for RMarkdown documents.\n\n\n## Examples: \n\n```{r, eval=FALSE}\n\nlibrary(shiny)\nlibrary(mailtoR)\n\nui \u003c- fluidPage(\n\n\n\n  mailtoR(email = \"info@rstudio.com\",\n          text = \"Click here to send an email !\"),\n\n\n  use_mailtoR()\n\n\n)\n\nserver \u003c- function(input, output) {}\n\nshinyApp(ui = ui, server = server)\n\n\n\n```\n\n![](man/figures/mailtoRexample1.gif)\n\nYou can use many parameters to configure your email framework: \n\n\n```{r, eval=FALSE}\n\nlibrary(shiny)\nlibrary(mailtoR)\n\nui \u003c- fluidPage(\n\n\n\n  mailtoR(email = \"michaelscott@dundermifflin.org\",\n          text = \"click here to send an email\", \n          subject = \"URGENT\", \n          cc = c(\"jimhalpert@dundermifflin.org\", \"dwightschrute@dundermifflin.org\"), \n          body = \"Hi Michaels, it's David Wallace, your branch needs to make more sales !!!!!!!\"),\n\n\n  use_mailtoR()\n\n\n)\n\nserver \u003c- function(input, output) {}\n\nshinyApp(ui = ui, server = server)\n\n\n\n```\n![](man/figures/mailtoRexample2.gif)\n\nUsing the [glue](https://CRAN.R-project.org/package=glue) package, you can ever create a reproducible text report that you'll embed within your email: \n\n\n\n\n```{r, eval=FALSE}\n\nlibrary(shiny)\nlibrary(mailtoR)\n\nui \u003c- fluidPage(\n\n\n\n  mailtoR(email = \"random_person@random.org\",\n          text = \"click here to send an email\", \n          subject = \"Useful Information\", \n          body = glue::glue(\n          \n          \"\nHi,\n          \nDid you know that the mtcars dataset has {nrow(mtcars)} rows and {ncol(mtcars)} columns ? \n            \nBest regards. \n            \n            \"\n            \n            \n            \n          )),\n\n\n  use_mailtoR()\n\n\n)\n\nserver \u003c- function(input, output) {}\n\nshinyApp(ui = ui, server = server)\n\n\n\n```\n\n![](man/figures/mailtoRexample3.gif)\n\nIf you want to send a vector of data you'll need to use `mailtoR` in conjunction with the `jsonlite` package. \n\n\n\n\n```{r, eval=FALSE}\n\nlibrary(shiny)\nlibrary(mailtoR)\nlibrary(jsonlite)\n\n\n# converting our data to JSON format\n\nvec \u003c- toJSON(mtcars$mpg)\n\n# reformat our results to make it prettier \n\nvec_pretty \u003c- prettify(vec)\n\n\nui \u003c- fluidPage(\n\n  mailtoR(email = \"random_person@random.org\",\n          text = \"click here to send an email\", \n          subject = \"Useful Information\", \n          body = glue::glue(\n          \n          \"\nHi,\n          \n\nBelow you'll find the mpg column of the mtcars data frame: \n\n{vec_pretty}\n\nBest regards\n            \n            \"\n            \n          )),\n\n\n  use_mailtoR()\n\n\n)\n\nserver \u003c- function(input, output) {}\n\nshinyApp(ui = ui, server = server)\n\n```\n\n\n![](man/figures/mailtoRexample4.gif)\n\n\n\n\n## Code of Conduct\n\nPlease note that the mailtoR project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeddelegrand7%2FmailtoR","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffeddelegrand7%2FmailtoR","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffeddelegrand7%2FmailtoR/lists"}