I have the below program which send the mail using java mail api , now this the is the simple program i have developed now i want to modify in terms of parallel execution by using executorframework that i want that 5 different threads independently should trigger my this program but those 5 different threads should trigger simultaneously at the same time
lets say there are five different threads t1,t2,t3,t4 and t5 then all of them should independently hit my function which is main(@) is calling rite now but at the same time
below is my java code
public class SSendEmail {
public static void main(String [] args) throws Exception, IOException, Exception{
String smtpHost = "xxx";
String mailSmtpPort = "000";
String mailTo[] = {"sart@wer.com" };
String mailCc[] = {"sart@wer.com" };
xxsendmail(mailTo, mailCc, "sendername",
"testsubject.", "testsubject..", smtpHost , mailSmtpPort);
}