title: Adding an Email button in Shiny, using TableTools or otherwise
body: <p>The code below produces a DataTable output that I'd like to have it emailed using an Email button, similar to the Export button created below. Is there an easy way to add a button so that when you click, it pops up Microsoft Outlook to send the datatable as an attachment, say in csv format?  </p>
  
  <p>Also, please click <a href="https://stackoverflow.com/questions/27649481/datatable-tabletools-extension-implementation-in-shiny">here</a> and <a href="https://stackoverflow.com/questions/27651004/adding-total-subtotal-to-the-bottom-of-a-datatable-in-shiny">here</a> to help with a similar questions.  </p>
  
  <pre><code>#Load required packages
  require(shiny)
  
  #Create a dataframe
  df &lt;- data.frame(random=1:160)
  
  server &lt;- function(input,output,session){
  
      #Display df using DataTable and apply desired options
      output$display &lt;- renderDataTable({df}, 
             option=list(pageLength=100,
                         "dom" = 'T&lt;"clear"&gt;lfrtip',
                         "tableTools" = list(
                          "sSwfPath" = "//cdn.datatables.net/tabletools/2.2.3/swf/copy_csv_xls_pdf.swf",
                          "aButtons" = list(list("sExtends" = "csv","oSelectorOpts"=list("page"="all"),"sButtonText" = "Export","aButtons" ="csv")))         
         )
  
     )
  }
  
  ui &lt;- shinyUI(fluidPage(
  
      #Add a title
      h1('Testing TableTools'),
  
      #Add required JS libraries
      tagList(
          singleton(tags$head(tags$script(src='//cdn.datatables.net/1.10.4/js/jquery.dataTables.min.js',type='text/javascript'))),
          singleton(tags$head(tags$script(src='//cdn.datatables.net/tabletools/2.2.3/js/dataTables.tableTools.min.js',type='text/javascript'))),
          singleton(tags$head(tags$link(href='//cdn.datatables.net/tabletools/2.2.3/css/dataTables.tableTools.css',rel='stylesheet',type='text/css')))
              ),
  
  
          mainPanel(
             #Display results
             dataTableOutput('display')
                   )      
  
  
  ))
  
  shinyApp(ui = ui, server = server)
  </code></pre>