def send_mail(content: String): Unit = {
val to: String = "xx@qq.com"
val subject: String = "mail subject"
val from: String = "xx@qq.com"
val mailhost: String = "10.199.xx.xx";
val port = 99;
val user: String = "Bigdata_notice"
val password: String = "xxxxx"
val props: Properties = new Properties()
props.setProperty("mail.smtp.host", mailhost);
props.setProperty("mail.transport.protocol", "smtp");
props.setProperty("mail.smtp.auth", "true");
val session = Session.getInstance(props);
session.setDebug(true)
val ts = session.getTransport
ts.connect(mailhost, port, user, password);
val msg = new MimeMessage(session);
msg.setFrom(new InternetAddress(from));
msg.setRecipients(Message.RecipientType.TO, to);
msg.setRecipients(Message.RecipientType.CC, "xx@qq.com,xxx@bl.com")
msg.setSubject(subject);
msg.setSentDate(new Date());
msg.setContent(content, "text/html;charset=utf-8")
ts.sendMessage(msg, msg.getAllRecipients);
ts.close()
}