简体   繁体   English

检查电子邮件是否存在于 PHP 中

[英]Check if an email exists in PHP

I'm developing an hotel booker and I need to know if an email exists, else I can't write the confirmation to the user and I can't comunicate with him.我正在开发酒店预订员,我需要知道电子邮件是否存在,否则我无法向用户写确认信,也无法与他沟通。 I've found a lot of PHP classes that do this work but no one of them do this is the right way;我发现很多 PHP 类都可以完成这项工作,但没有一个是正确的; do you know a way to do this?你知道一种方法吗?

The only thing you could do that would work in a feasible way would be something like:你唯一能做的是以可行的方式工作的事情是这样的:

  1. Check if the mail has a valid format.检查邮件是否具有有效格式。
  2. Send a verification e-mail for the user to confirm the e-mail.向用户发送验证电子邮件以确认电子邮件。
  3. Once the user verifies you know you can communicate, otherwise you don't let them continue using your service.一旦用户确认您知道您可以通信,否则您不会让他们继续使用您的服务。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM