i'd found a solution for this problem.
this is the code i use:
try{
PrintStream out1;
SmtpClient send = new SmtpClient("smtp........com"); // create a mail client
send.from(emailVal); // email address of the sender
send.to(" "); // email address of the receiver
out1 = send.startMessage();
//Format of the email
out1.println("From:
cct115c@motorola.com");
out1.println("To:
cyo006c@motorola.com");
out1.println("Subject: " + subject);
out1.println(content);
out1.flush();
out1.close();
send.closeServer();
}
catch (Exception e) {
errorMsg = e.getMessage();
}
I'd used smtpClient to replace the JavaMail it really works in UNIX but it will show error : connection reset if you run it in Window environment.