Background: There are some invalid email adress in our system. I want to find all these invalid addresses. Some of these address are outlook address and some are instant message (IM) address.
Issue: I have meet an issue when use SMTP to validate email address. SMTP works when validate outlook address like ab1234@outlook.com. However, SMTP failed to validate instant message (IM) address like bob.archer@corpration.com which does exist.
Is there a method using java to validate instant message (IM) address.
Hope for your reply, Thanks.
Apache commons provides a solid validator that can help you:
You can take a look the link above and use the methods of EmailValidator class.
除了检查电子邮件格式(一个或多个字母数字和/或特殊字符后跟@,再用几个字母数字字符至少用一个“。”分隔)之外,验证任何内容的唯一方法是实际尝试使用它,因为电子邮件或即时消息。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.