我无法向格式低于
的分发列表发送电子邮件MA NA US error@hub.wmmercer.com
InternetAddress[] mailtoArr = new InternetAddress[str.length];
for loop {
mailtoArr[i] = new InternetAddress((str[i].trim()));
}
它给了我以下例外:
javax.mail.internet.AddressException: Illegal whitespace in address in string ``#MA NA US error@hub.wmmercer.com''
at javax.mail.internet.InternetAddress.checkAddress(InternetAddress.java:900)
at javax.mail.internet.InternetAddress.parse(InternetAddress.java:793)
at javax.mail.internet.InternetAddress.parse(InternetAddress.java:529)
at javax.mail.internet.InternetAddress.<init>(InternetAddress.java:65)
有人请帮帮我。 提前谢谢。