AnsweredAssumed Answered

couldn't use mail using yarn-cluster

Question asked by vislesh on Dec 8, 2016
Latest reply on Dec 16, 2016 by aalvarez

String body = "Hi this is body";
String mailCmd = "echo " + body + "| mail -s SUBJECT xxx@abc.com";
String[] command = { "/bin/sh", "-c", mailCmd };
Process process = Runtime.getRuntime().exec(command);

 

 

when i'm running it in local mode , it could send mail as expected . but if i'm using yarn-cluster it's sending out mail without body. why is it happening ? how can i fix it?

Outcomes