Using JavaMail, I am creating a program that can handle bounced email. I referring to this tutorial http://www.tutorialspoint.com/javamail_api/javamail_api_bounced_messages.htm.
Is there a way to catch if the email is bounced?
boolean bounce = false; //how can i make this TRUE if the email is bounced?
try {
System.out.println("Sending ....");
transport.connect(smtpServer, port, userid, password);
transport.sendMessage(message,
message.getRecipients(Message.RecipientType.TO));
System.out.println("Sending done ...");
} catch (Exception e) {
System.err.println("Error Sending: ");
e.printStackTrace();
}
Thanks in advance!