嗨,我有以下示例 xml,我需要从 xml 文档中获取不同的无效电子邮件。我想所有时间项目都像“嵌套异常是:com.sun.mail.smtp.SMTPAddressFailedException:550 5.1.1 <”和“:收件人地址被拒绝:虚拟别名表中的用户未知;” 是恒定的
<?xml version = "1.0" encoding = "UTF-8"?>
<root>
<Error_Message>Error sending mail message. Cause: javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 550 5.1.1 <abcdef@gmail.com>: Recipient address rejected: User unknown in virtual alias table
;
nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 550 5.1.1 <abcdefgh@gmail.com>: Recipient address rejected: User unknown in virtual alias table
;
nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 550 5.1.1 <12345678@gmail.com>: Recipient address rejected: User unknown in virtual alias table
;
nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 550 5.1.1 <12345678@gmail.com>: Recipient address rejected: User unknown in virtual alias table
;
nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 550 5.1.1 <abcdefgh@gmail.com>: Recipient address rejected: User unknown in virtual alias table
;
nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 550 5.1.1 <12345678@gmail.com>: Recipient address rejected: User unknown in virtual alias table
;
nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 550 5.1.1 <12345678@gmail.com>: Recipient address rejected: User unknown in virtual alias table
</Error_Message>
<err_mesage>5</err_mesage>
</root>
预期输出为:
<root>
<EMAILID>abcdef@gmail.com</EMAILID>
<EMAILID>abcdefgh@gmail.com@gmail.com</EMAILID>
<EMAILID>12345678@gmail.com</EMAILID>
</root>