我正在尝试将 Twilio 电子邮件验证集成到我的应用程序中。这是代码:
public EmailVerificationDto sendVerificationEmail(String recipient) {
Verification verification = Verification.creator(
PATH_SERVICE_SID,
recipient,
"email")
.setChannelConfiguration(
new HashMap<>() {{
put("template_id", TEMPLATE_ID);
put("from", SENDER_EMAIL);
put("from_name", "Puggle");
}})
.create();
return new EmailVerificationDto(
verification.getTo(),
verification.getSid(),
verification.getStatus(),
verification.getDateCreated().toLocalDate()
);
}
我可以在仪表板上看到电子邮件,但它卡在处理中:
我遇到了同样的问题,似乎 SendGrid 对于使用该服务进行欺诈性使用的人存在问题,因此您需要先进行验证。在页面顶部,您可能会收到一条消息,提示您需要进行验证。您需要填写一份表格,然后他们将通过电子邮件与您联系以收集更多信息并接受或拒绝您访问该服务。
我的原因与原始发帖者的原因不同,但如果您使用 SendGrid 的延迟功能,电子邮件将出现在处理过程中(该 API 允许您设置发送电子邮件的时间,并且它会一直处于处理状态,直到发送时间结束)达到)。