message.setSubject("[System report from Sino-Star] " + subject);
message.setContent(content, "text/plain");
message.addRecipient(Message.RecipientType.TO, new InternetAddress(email));
transport.connect(SMTP_HOST_NAME, SMTP_HOST_PORT, SMTP_AUTH_USER, SMTP_AUTH_PWD);
transport.sendMessage(message, message.getRecipients(Message.RecipientType.TO));
} catch (NoSuchProviderException e) {
throw new NotificationServiceException("Cannot send email. No such provider exception: " + e.getMessage(),
e);
} catch (MessagingException e) {