我想发送一封电子邮件(目前使用blastula包),邮件正文是在以下位置创建的反应对象(MyMSG()):
MyMSG <- reactive({
output$text_output <- renderText({input$text_input})
})但是不能成功地将我的textAreaInput中的文本导出到电子邮件正文中。在我的示例中:
observeEvent(input$sendMSG, {
output$sendMSG <- MyMSG()
my_email_object<-
compose_email(
body = c(MyMSG())
)但是消息的正文是空的,或者如果我更改了某些内容(例如,as.vector(MyMSG())或readLines(MyMSG()))出现“writeImpl错误:要写入的文本必须是一个长度为一个字符的文本”错误。
那么,有什么办法可以解决这个问题吗?
发布于 2021-05-17 18:37:52
这一点:
MyMSG <- reactive({
output$text_output <- renderText({input$text_input})
})是不正确的。简单地做
output$text_output <- renderText({input$text_input})对于你的观察者:
observeEvent(input$sendMSG, {
my_email_object <-
compose_email(
body = input$text_input
)https://stackoverflow.com/questions/67558869
复制相似问题