|
ru.cgi.perl- RU.CGI.PERL ------------------------------------------------------------------ From : Slava Sidorkov 2:5030/1139.20 05 Mar 2001 23:32:44 To : Stanislav Los Subject : Проверка на валидность мыла -------------------------------------------------------------------------------- Когда мишки были пчелами (Вс 04 Мар 2001 18:33) Stanislav Los писал к All SL> Как проверить на валидность адрес е-маил? SL> Отправка письма идет через sendmail Вот кусочек из стандартного perlfaq9: ===> Откусили d <=== [..кусь-кусь..] Many are tempted to try to eliminate many frequently- invalid mail addresses with a simple regexp, such as /^[\w.-]+\@([\w.-]\.)+\w+$/. It's a very bad idea. However, this also throws out many valid ones, and says nothing about potential deliverability, so is not suggested. Instead, see http://www.perl.com/CPAN/authors/Tom_Christiansen/scripts/ckaddr.gz , which actually checks against the full RFC spec (except for nested comments), looks for addresses you may not wish [..кусь-кусь..] Our best advice for verifying a person's mail address is to have them enter their address twice, just as you normally do to change a password. This usually weeds out typos. If both versions match, send mail to that address with a personal message that looks somewhat like: [..кусь-кусь..] ===> Закусили d <=== _ (_' ,_) i l v e r --- И какой-то Win95 будет мне указывать, когда комп выключать?! * Origin: Autodafe Station (2:5030/1139.20) Вернуться к списку тем, сортированных по: возрастание даты уменьшение даты тема автор
Архивное /ru.cgi.perl/188783aa41a4a.html, оценка из 5, голосов 10
|