emailjs.com support for R.
## From github: latest version
remotes::install_github('changwoolim/emailjsr')
Before use, you should sign up at emailjs.com, and make your template. Please sure that you should not expose your user id, access token, and so on.
You should allow EmailJS API for non-browser applications.
If you want to detect User-agent, Browser width and height, type down
shinybrowser::detect()
on your ui.
emailjsr::send_email(service_id, user_id, template_id, template_params, access_token)
When you use ‘shiny’, you can use preset modal.
library(shiny)
library(emailjsr)
ui <- fluidPage(
use_emailjsr_ui("id")
)
server <- function(input, output, session) {
emailjsr::use_emailjsr_server("id",
service_id = "Your_service_id",
template_id = "Your_template_id",
user_id = "Your_user_id",
access_token = "Your_Access_Token",
language = "en"
)
}
shinyApp(ui, server)
Please remember you should fill your own ids, and tokens.
You can see button named “Show feedback modal”. This message is default, and you can change it. When you click, you will see modal below.
In this preset, Feedback * is required. So if you don’t write down anything, error message will be shown. If you fill Feedback * and other form(if needed), just click “Submit” button. You will receive email right away.
You can make issue at my github repository. Any bug report, suggestion are welcomed.