Skip to content

Commit

Permalink
Fixed build issue in logs
Browse files Browse the repository at this point in the history
  • Loading branch information
karthik-tarento committed Feb 9, 2024
1 parent f9a8794 commit cc1b117
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,13 @@ private boolean sendEmail(Session session, MimeMessage message) {
transport = getTransportClient(session);
transport.sendMessage(message, message.getAllRecipients());
} catch (Exception e) {
logger.error("SendMail:sendMail: Exception occurred while sending message = " + message.getContent().toString(), e);
String msgContent = "";
try {
msgContent = message.getContent().toString();
} catch (Exception e1) {
logger.error("Failed to retrieve the content from message.", e1);
}
logger.error("SendMail:sendMail: Exception occurred while sending message = " + msgContent, e);
response = false;
} finally {
try {
Expand Down

0 comments on commit cc1b117

Please sign in to comment.