Utali Woyenera wa Imelo

Zithunzi za Depositph 1948865 s

Ndidayenera kukumba lero kuti ndiupeze, koma kodi mumadziwa kutalika kwa imelo? Idagawika m'magawo ... Dzina@Domain.com. Izi malinga ndi Zogulitsa.

  1. Dzinalo lingatenge zilembo 1 mpaka 64.
  2. Dambwe limatha kukhala zilembo 1 mpaka 255.

Wow… ndiye kuti mwina iyi ndi imelo yoyenera:


loremaipsumadolorasitaametbaconsectetueraadipiscin
alirezatalischioriginal @ alirezatalischioriginal
etueraadipiscingaelitcaSedaidametusautanisiavehicu
laalactusPellentesqueatinciduntbadiaamaidacondimn
tumarutumbaturpisamassaaconsectetueraarcubaeuatin
ciduntaliberoaugueavestibulumaeratcaPhasellusatin
ciduntaturpisaduis.com

Yesani kuyika izi patsamba lantchito! Chodabwitsa, madera ambiri amaimelo amakhala ndi zilembo 100 pa intaneti. Izi sizovomerezeka. Ngati mukufuna kutsimikizira imelo kuti imangidwe bwino pogwiritsa ntchito PHP, ndapeza mawuwa paukonde:

http://derrick.pallas.us/email-validator/ # License: Chilolezo Chaulere Chaophunzira 2.1 # Mtundu: 2006-12-01a ngati (! ereg (''. '^'. '[-! # $% & \ '* + / 0-9 =? AZ ^ _a-z {|} ~]'. '(\\.? [-! # $% & \' * + / 0-9 =? AZ ^ _a-z {) |}}]] * '.' @ '.' [a-zA-Z] (-? [a-zA-Z0-9]) * '.' (\\. [a-zA-Z] (- ? [a-zA-Z0-9]) *) + '.' $ ', $ imelo)) bweretsani zabodza; mndandanda ($ local, $ domain) = split ("@", $ email, 2); ngati (strlen ($ local)> 64 || strlen ($ domain)> 255) abwerere zabodza; ngati ($ check &&! gethostbynamel ($ domain)) ibwerera zabodza; bwererani zoona; # TSIRIZA ###### }

9 Comments

  1. 1
  2. 2

    Inde, ndawona kusakwaniritsidwa kwa mayankho ena ndi RFC. Ndazindikira, komabe, kuti regex iyi ndi yopanda tanthauzo komanso siyomwe imakhala. Ndimakumbukira kuwerenga regex yeniyeni (kulola <,>,, ndi zina) ndizovuta kwambiri pamachitidwe ambiri.

    Komabe, zalembedwa mwachidule komanso motsimikiza yankho lomwe liyenera kukhala lovomerezeka ku imelo iliyonse yantchito.

    Zikomonso!
    Doug

  3. 3

    Tsoka ilo, ndalumikiza tsambalo ndi RFC yolakwika (2821 m'malo mwa 2822) koma yakonzedwa. Ma bulaketi ang'onoting'ono sangakhale gawo lazomwe zimakhalapo kapena maimidwe a imelo; M'malo mwake, amaimira malo opangira ma tokenization, mwachitsanzo, atha kugwiritsidwa ntchito kuzungulira ma imelo (mwachitsanzo mwa owerenga makalata) makamaka chifukwa sangakhale gawo la adilesiyi.

    Chimodzi mwazomwe sikugwira ntchito yanga ndikudandaula za maimelo omwe atchulidwako - pomwe gawo lakomwe limapezeka m'mawu awiri - chifukwa RFC2821 imati palibe amene ayenera kulemba adilesi yake motere. (Ndikukhulupirira kuti mawonekedwe ake ndi obwerera kumbuyo ndipo tsopano ndi machitidwe oyipa.)

  4. 4
  5. 5

    Pali choletsa mu RFC 2821 kutalika kwa adilesi mu MAIL ndi RCPT malamulo a zilembo 256. Malire apamwamba pazitali za adilesi amayenera kuwerengedwa kuti ndi 256.

    - Gwero: RFC 3696 Errata

    Komanso, chifukwa RFC 2181 imati "Dzinalo lonse limangokhala ma octet 255", amatanthauziridwa molakwika mobwerezabwereza ndi anthu (kuphatikiza olemba ena a RFCs) kutanthauza kuti mayina azidziwitso amatha kutalika kwa 255. Koma RFC2181 ikulankhula za chiwonetsero cha DNS pamlingo wapa waya, osati zilembo zosindikiza.

    Kutalika kwakutali kwa dzina la domain ndi ma 253 chars (254 kuphatikiza trailing dot, 255 octets pa waya ndi termining null). Ndipo ndizomwe BIND ndi DiG zimakhazikitsa.

  6. 6
  7. 7
  8. 8

Mukuganiza chiyani?

Tsambali likugwiritsa ntchito Akismet kuchepetsa spam. Phunzirani momwe deta yanu ikufotokozera.