验证电子邮件地址 - 语法和dns [英] Verify an e-mail-adress - syntax and dns

查看:147
本文介绍了验证电子邮件地址 - 语法和dns的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人可以通过函数/脚本验证电子邮件地址?


应该:

a)检查语法

b)验证现有的邮件服务器或DNS / MX记录


ingo

Has anyone a function/script to verify an e-mail-address?

It should:
a) check the syntax
b) verify an existing mailserver or DNS/MX records

ingo

推荐答案

Ingo Linkweiler写道:
Ingo Linkweiler wrote:

b)验证现有邮件服务器或DNS / MX记录
b) verify an existing mailserver or DNS/MX records



"或?这是两件不同的事情。


如果您还不知道:即使您测试了所有这些,它仍然可能


- 目标邮件帐户不存在

- 发件人的IP由服务器过滤,因此他拒绝

- localpart有语法错误(localpart中允许的字符

取决于服务器)


问候,

Bj?


-

BOFH借口#280:


Traceroute说有骨干中的路由问题。

这不是我们的问题。

"Or"? That''s two different things.

If you don''t know already: Even if you test all this, it is still
possible that

- the target mail account doesn''t exist
- the sender''s IP is filtered by the server so he''ll reject
- the localpart has syntax errors (allowed chars in the localpart
are up to the server)

Regards,
Bj?rn

--
BOFH excuse #280:

Traceroute says that there is a routing problem in the backbone.
It''s not our problem.


Bjoern Schliessmann schrieb:
Bjoern Schliessmann schrieb:

Ingo Linkweiler写道:
Ingo Linkweiler wrote:

> b)验证现有的邮件服务器或DNS / MX记录
>b) verify an existing mailserver or DNS/MX records



或?这是两件不同的事情。


如果您还不知道:即使您测试了所有这些,它仍然可能


- 目标邮件帐户不存在

- 服务器过滤发件人的IP,这样他就会拒绝


"Or"? That''s two different things.

If you don''t know already: Even if you test all this, it is still
possible that

- the target mail account doesn''t exist
- the sender''s IP is filtered by the server so he''ll reject



是的,我知道这个。

但它仍然比不检查更好。

脚本将用作部分auf一个用户注册页面,以避免

虚拟输入,如js ******** @ hdhjdfhjh.net

Yes, I know this.
But its still better than not checking it.
The script will be used as part auf a user registration page to avoid
dummy-inputs like "js********@hdhjdfhjh.net"


在< ef ********** @ news01.versatel.de> ;, Ingo Linkweiler写道:
In <ef**********@news01.versatel.de>, Ingo Linkweiler wrote:

脚本将用作用户注册页面的一部分,以避免像js ******** @ hdhjdfhjh.net这样的虚拟输入。
The script will be used as part auf a user registration page to avoid
dummy-inputs like "js********@hdhjdfhjh.net"



处理此问题的通常方法是发送确认邮件。不需要

需要事先检查地址在语法上是否正确。

Ciao,

Marc''BlackJack''Rintsch

The usual way to cope with this is sending out confirmation mails. No
need to check if the address is syntactically correct beforehand.

Ciao,
Marc ''BlackJack'' Rintsch


这篇关于验证电子邮件地址 - 语法和dns的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆