R言語発email


最近大型机でRを运行して、运行时间はとても长くて、いつ走り终わることを知りません.使いやすいパッケージmailR(https://github.com/rpremraj/mailR)、実は飛信のAPIで自分にメールを送ることもできます(いずれも非公式で、以前使ったことがありますが、今日はもう期限切れです).
それではmailRをご紹介します
mailR
SMTPサーバ(認証不要)
send.mail(from = "sender@gmail.com",
          to = c("Recipient 1 <recipient1@gmail.com>", "recipient2@gmail.com"),
          cc = c("CC Recipient <cc.recipient@gmail.com>"),
          bcc = c("BCC Recipient <bcc.recipient@gmail.com>"),
          # cc   bcc        ,        ,    ,   to    
          subject = "Subject of the email",
          body = "Body of the email",
          smtp = list(host.name = "aspmx.l.google.com", port = 25),
          authenticate = FALSE,
          encoding = "utf-8",
          send = TRUE)

SMTPサーバー(認証が必要)
send.mail(from = "[email protected]",
          to = c("[email protected]", "Recipient 2 <[email protected]>"),
          replyTo = c("Reply to someone else <[email protected]>")#       ,        
          subject = "Subject of the email",
          body = "Body of the email",
          smtp = list(host.name = "smtp.gmail.com", port = 465, user.name = "gmail_username", passwd = "password", ssl = TRUE),
          authenticate = TRUE,
          send = TRUE)

添付ファイルの送信
send.mail(from = "[email protected]",
          to = c("[email protected]", "[email protected]"),
          subject = "Subject of the email",
          body = "Body of the email",
          smtp = list(host.name = "smtp.gmail.com", port = 465, user.name = "gmail_username", passwd = "password", ssl = TRUE),
          authenticate = TRUE,
          send = TRUE,
          attach.files = c("./download.log", "upload.log", #    
          "https://dl.dropboxusercontent.com/u/5031586/How%20to%20use%20the%20Public%20folder.rtf"),
          file.names = c("Download log.log", "Upload log.log", "DropBox File.rtf"), # optional parameter
          file.descriptions = c("Description for download log", "Description for upload log", "DropBox File"), # optional parameter
          debug = TRUE)

具体的には行けるhttps://github.com/rpremraj/mailR.163メールボックスのSMTPポート番号を添付します