R/MailOverPerl.R

Defines functions MailOverPerl

MailOverPerl <- 
function(MailList= NULL,perl.init){
if(length(MailList)>=6){
addVec <- paste("send_mail(",paste(lapply(MailList,function(x){x <- paste("\"",x,"\"",collapse = "",sep = "")}),collapse = ",",sep = ""),")",sep = "")
temp<- readLines(perl.init)
DropZone <- grep("#DropZone",temp)
temp <- temp[-c((DropZone+1):length(temp))]
write(c(temp,addVec), perl.init)

cat("Mail\n")
wd <- getwd()
setwd(dirname(perl.init))
PerlSend <<- perl.init
PerlMail <<- system(PerlCommand<<-paste("perl",basename(perl.init)), wait = T, intern = F,ignore.stdout = T,ignore.stderr = T)
setwd(wd)
}
}

Try the mqqc package in your browser

Any scripts or data that you put into this service are public.

mqqc documentation built on July 30, 2020, 3 p.m.