What is the best/easy way to validate an email address in Ruby?

前端 未结 10 859
刺人心
刺人心 2020-12-13 06:40

What is the best/easy way to validate an email address in ruby (on the server side)?

10条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-13 06:52

    In Ruby? The same way as in any language.

    Send a confirmation email to the address with a link that the recipient has to click before the email address is considered fully validated.

    There are any number of reasons why a perfectly formatted address may still be invalid (no actual user at that address, blocked by spam filters, and so on). The only way to know for sure is a successfully completed end-to-end transaction of some description.

提交回复
热议问题