1. Related code:
public static void sendSSLMessage (String hostName, int port, String username, String password, String subject, String massage, String. To) throws EmailException {
Email email = new SimpleEmail();
email.setCharset("UTF-8");
email.setHostName(hostName);
email.setSmtpPort(port);
email.setSSLOnConnect(true);
email.setAuthenticator(new DefaultAuthenticator(username, password));
email.setFrom(username);
email.addTo(to);
email.setSubject(subject);
email.setMsg(massage);
email.send();
}
2. Screenshot:
3. There are multiple recipients, only one, 163 mailbox can show multiple, Ali enterprise mailbox only shows one