已在Spring Boot / Security注册中验证电子邮件

问题描述 投票:0回答:2

如何验证注册期间提供的电子邮件是真实的?确认链接是一个显而易见的选择,但我看到网站在您点击“注册”后立即发生某种电子邮件验证。如果电子邮件是假的,则该过程将停止。怎么能在Spring完成? (例如:safaribooksonline)

spring-boot spring-security
2个回答
1
投票

您必须检查邮件是否被退回。如果是,则不是有效的电子邮件。您可以在java中使用neverbouncehere is the github link提供的api。


0
投票

您可以尝试使用MailboxValidator API。

只需在https://www.mailboxvalidator.com/plans#api注册免费的API密钥即可

然后你可以在https://github.com/MailboxValidator/mailboxvalidator-java上使用Java代码或使用Maven https://mvnrepository.com/artifact/com.mailboxvalidator/mailboxvalidator-java/1.0.0

© www.soinside.com 2019 - 2024. All rights reserved.