How to encode Internet address
问题 code to send email is following: MimeMessage msg = new MimeMessage(session); msg.setSubject("subject", "UTF-8"); // here you specify your subject encoding msg.setContent("yourBody", "text/plain; charset=utf-8"); msg.setFrom("senderAddress"); msg.addRecipient(Message.RecipientType.TO, new InternetAddress(address)); Transport.send(msg); My probelem is that as as i have encoded subject in utf-8 how can i encode recipient address ie. new InternetAddress(address) 回答1: Email address should follow