How to send HTML email using R

前端 未结 5 930
慢半拍i
慢半拍i 2020-12-16 02:44

I have searched SO and well as google and cannot seem to find a solution to my problem. I am trying to send a HTML formatted email within R using sendmailR package. The plai

5条回答
  •  半阙折子戏
    2020-12-16 02:56

    I prefer to use a specialized Mail agent for this type of task than using an R package. You can for example use Mutt. Available for linux and windows.

    Here I am using option -e to send a command:

    writeLines(message,
               p<-pipe(paste('mutt -e ','"set content_type=text/html"',
                              from,to,' -s ', subject))
    close(p)
    

提交回复
热议问题