sending a contact form - shinyapp

866 views
Skip to first unread message

Carlos Alberto Silva

unread,
Feb 24, 2014, 2:33:25 PM2/24/14
to shiny-...@googlegroups.com

Hi shiny community,

Does someone know how could the visitors from the shiny-app fill out a contact form which the message will be send to the manager account (email)  , and after clicked on the "send",  they can be able to see the app.
something like that:

require(shiny)
runApp(list(
 ui = bootstrapPage(
    HTML('<!DOCTYPE html>
<html>
<body>

<h3>Send e-mail to som...@example.com:</h3>

<form action="MAILTO:som...@example.com" method="post" enctype="text/plain">
Name:<br>
<input type="text" name="name" value="your name"><br>
E-mail:<br>
<input type="text" name="mail" value="your email"><br>
Comment:<br>
<input type="text" name="comment" value="your comment" size="50"><br><br>
<input type="submit" value="Send">
<input type="reset" value="Reset">
</form>

</body>
</html>')
  ),
  server = function(input, output) {
      
    })
)

Thank you so much,
Best Regards
Carlos A. Silva

Stéphane Laurent

unread,
Feb 24, 2014, 2:41:56 PM2/24/14
to shiny-...@googlegroups.com
Hello,

Hope this helps.
Message has been deleted

Velappan Periasamy

unread,
Sep 19, 2014, 5:08:42 AM9/19/14
to shiny-...@googlegroups.com
 I could not sent mail from Rstudio server  console.
please suggest me a way to send mail.
thanks
veepsirtt
---------------------------------------------------------------------------------------------------------
> source('~/.active-rstudio-document', echo=TRUE)

> library(sendmailR)

>     from <- "<veep...@gmail.com>"

>     to <- "<veep...@gmail.com>"

>     subject <- "subject text"

>     msg <- "message"

>     sendmail(from, to, subject, msg)
Error in socketConnection(host = server, port = port, blocking = TRUE) : 
  cannot open the connection
In addition: Warning message:
In socketConnection(host = server, port = port, blocking = TRUE) :
  localhost:25 cannot be opened
> 
> sessionInfo()
R version 2.15.3 (2013-03-01)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8       
 [4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=C                 LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] tcltk     grid      stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] rJython_0.0-4   rjson_0.2.14    rJava_0.9-3     sendmailR_1.1-2 base64enc_0.1-1 Rmail_1.1      
 [7] caTools_1.17    mail_1.0        plyr_1.7.1      scales_0.2.3    ggplot2_0.9.3.1 RCurl_1.95-4.1 
[13] bitops_1.0-4.1  XML_3.98-1.1   

loaded via a namespace (and not attached):
 [1] colorspace_1.2-0   dichromat_1.2-4    digest_0.5.2       gtable_0.1.1       labeling_0.1      
 [6] MASS_7.3-23        munsell_0.4        proto_0.3-9.2      RColorBrewer_1.0-5 reshape2_1.2.1    
[11] stringr_0.6.1      tools_2.15.3      

Reply all
Reply to author
Forward
0 new messages