Ubude bekheli le-imeyili elivumelekile

Ama-Depositphotos 1948865 s

Bekufanele ngenze okuthile namhlanje ukuze ngikuthole, kepha bewazi ukuthi ubude obufanele bekheli le-imeyili yiliphi? Empeleni yehlukaniswe yaba izingxenye… Igama@Domain.com. Lokhu kushiwo I-RFC2822.

  1. Igama lingaba yizinhlamvu ezi-1 kuye kwangama-64.
  2. Isizinda singaba yizinhlamvu ezi-1 kuye kwezingama-255.

Wow… lokho kusho ukuthi leli kungaba ikheli le-imeyili elivumelekile:


loremaipsumadolorasitaametbaconsectetueraadipiscin
Noluthando @ loremaipsumadolorasitaametbaconsect
etueraadipiscingaelitcaSedaidametusautanisiavehicu
laalactusPellentesqueatinciduntbadiaamaidacondimn
tumarutrumbaturpisamassaaconsectetueraarcubaeuatin
ciduntaliberoaugueavestibulumaeratcaPhasellusatin
ciduntaturpisaduis.com

Zama ukufaka lokho ekhadini lebhizinisi! Kuyindida ukuthi izinkambu eziningi zamakheli we-imeyili zikhawulelwe ezinhlamvwini eziyi-100 kuwebhu. Lokho empeleni akuvumelekile. Uma ungathanda ukuqinisekisa ikheli le-imeyili lokwakhiwa okufanele usebenzisa i-PHP, ngithole le snippet enetheni:

http://derrick.pallas.us/email-validator/ # Ilayisense: Ilayisense yamahhala yezifundo 2.1 # Inguqulo: 2006-12-01a uma (! 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]) *) + '.' $ ', $ email)) buyela amanga; uhlu ($ local, $ domain) = split ("@", $ email, 2); uma (strlen ($ local)> 64 || strlen ($ domain)> 255) buyela amanga; uma ($ hlola &&! gethostbynamel ($ domain)) ibuya ingamanga; buyela kweqiniso; # UKUPHELA ######}

9 Amazwana

  1. 1
  2. 2

    Yebo, ngibonile ukungahambisani nezinye izixazululo nge-RFC. Ngibonile, nokho, ukuthi le regex ingeyesimo hhayi eyejwayelekile. Ngikhumbula ngifunda i-regex yangempela (ivumela i- <,>,, njll) ibaluleke kakhulu ezinhlelweni eziningi.

    Kodwa-ke, ibhalwe kahle futhi ngokuqinisekile yisixazululo okufanele samukeleke kunoma yiluphi uhlelo lokusebenza lwe-imeyili lwamabhizinisi.

    Ngiyabona futhi!
    Doug

  3. 3

    Ngeshwa, ngixhumanise lelo khasi ne-RFC engalungile (2821 esikhundleni se-2822) kepha lokho kulungisiwe. Abakaki be-engeli abakwazi ukuba yingxenye yezingxenye zasendaweni noma zesizinda sekheli le-imeyili; esikhundleni salokho, amele amaphuzu wethokheni, okungukuthi angasetshenziswa ukuzungeza ikheli le-imeyili (ngokwesibonelo kufunda lakho lemeyili) ngqo ngoba abakwazi ukuba yingxenye yekheli.

    Into eyodwa umsebenzi wami ongayenzi ukukhathazeka ngendlela ecashuniwe yamakheli e-imeyili - lapho ingxenye yendawo ivela kwizilinganiso eziphindwe kabili - ngoba i-RFC2821 empeleni ithi akekho umuntu okufanele abhale ikheli lakhe ngaleyo ndlela. (Ngikholwa ukuthi ifomu elokuhambisana nokubuyela emuva futhi manje sekuwumkhuba omubi.)

  4. 4
  5. 5

    Kunomkhawulo ku-RFC 2821 kubude bekheli kumiyalo ye-MAIL ne-RCPT yezinhlamvu ezingama-256. Umkhawulo ophezulu kubude bekheli kufanele uvame ukubhekwa njengowe-256.

    - Umthombo: RFC 3696 Errata

    Futhi, ngoba i-RFC 2181 ithi "Igama eligcwele lesizinda likhawulelwe kuma-octet angama-255", lichazwa ngokungaqondakali ngabantu (kufaka phakathi ababhali bamanye ama-RFC) njengokusho ukuthi amagama wesizinda angaba nezinhlamvu ezingama-255 ubude. Kepha i-RFC2181 ikhuluma ngokumelwa kwezinga leprotocol ye-DNS ocingweni, hhayi izinhlamvu eziphrintekayo.

    Ubude obukhulu begama lesizinda bungamashadi angama-253 (ama-254 afaka ichashazi lokulandela umkhondo, ama-octet angama-255 ocingweni ngokunqamula okungasebenzi). Futhi yilokho okusetshenziswa yi-BIND ne-DiG.

  6. 6
  7. 7
  8. 8

UCABANGANI?

Le sayithi isebenzisa i-Akismet ukunciphisa ugaxekile. Funda ukuthi idatha yakho yokuphawula isetshenziswa kanjani.