以下はコードの一部です
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);
}
}
「Transport.send(message);」の行で 私はベラコードの問題を抱えています。問題を解決する方法。