Rails电子邮件验证中的最新技术是什么? [英] What's the state of the art in email validation for Rails?
问题描述
我一直在使用 validates_email_veracity_of
,实际查询MX服务器。但是由于各种原因,这些都是失败的,主要是与网络流量和可靠性有关。
我环顾四周,我找不到很多人正在使用电子邮件地址执行理智检查的任何明显的事情。是否有一个维护的,相当准确的插件或宝石?
P.S .:请不要告诉我发送一封包含链接的电子邮件,看看电子邮件是否正常。我正在开发一个发送给朋友功能,所以这是不实际的。
使用Rails 3.0,您可以使用邮件宝石的无正则表达式的电子邮件验证。
What are you using to validate users' email addresses, and why?
I had been using validates_email_veracity_of
which actually queries the MX servers. But that is full of fail for various reasons, mostly related to network traffic and reliability.
I looked around and I couldn't find anything obvious that a lot of people are using to perform a sanity check on an email address. Is there a maintained, reasonably accurate plugin or gem for this?
P.S.: Please don't tell me to send an email with a link to see if the email works. I'm developing a "send to a friend" feature, so this isn't practical.
With Rails 3.0 you can use a email validation without regexp using the Mail gem.
Here is my implementation (packaged as a gem).
这篇关于Rails电子邮件验证中的最新技术是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!