Following is the piece of code
public void sendEmail(String toEmailAddr, String subject, String body) throws AppException {
Session session = Session.getDefaultInstance(props, null);
MimeMessage message = new MimeMessage(session);
try {
message.addRecipient(Message.RecipientType.TO,
new InternetAddress(toEmailAddr));
message.setSubject(subject);
message.setText(body);
Transport.send(message);
} catch (MessagingException ex) {
throw new AppException(
"Exception Occurred while processing EmailNotification.sendEmail method: ", ex);
}
}
In the line "Transport.send(message);" I am getting the vera code issue . How to fix the issue.