Email address format

Solved
boubou08 Posted messages 87 Status Member -  
 céline03 -
Hello everyone,
Does anyone have a website or a document that describes the format of an email address, the rules regarding the address format (firstname.lastname@site.com)
Thank you and see you soon.

5 answers

  1. sebsauvage Posted messages 33284 Registration date   Status Moderator Last intervention   15 684
     
    The precise specification is in paragraph 6.1 of RFC 822:
    http://ietf.org/rfc/rfc0822.txt

    But to put it more simply:

    Allowed characters: a-z 0-9 . _ -
    (case insensitive)
    followed by the at sign (@)
    followed by an existing domain name or subdomain (same allowed characters).
    3
    1. boubou08 Posted messages 87 Status Member 3
       
      Thank you for this information. Just one more question, spaces in an address are not allowed?
      0
      1. yomip > boubou08 Posted messages 87 Status Member
         
        no, not allowed
        0
      2. boubou08 Posted messages 87 Status Member 3 > yomip
         
        Thank you very much. I got what I wanted.
        Have a nice day and thanks again for the quick response.
        0
  2. nlx
     
    Hello,

    And does anyone have a PHP mask to validate this kind of addresses?

    I made an attempt that I was satisfied with using XSS software and manual attempts
    but it seems that a clever spammer managed to get me...

    Here is my attempt to correct:

     $ident = '[-a-z0-9!#$%&\'*+\\/=?^_`{|}~]'; $domain = '([a-z0-9]([-a-z0-9]*[a-z0-9]+)?)'; $regex = '/^'.$ident.'+'.'(\.'.$ident.'+)*'.'@'.'('.$domain.'{1,63}\.)+'.$domain.'{2,63}$/i'; if (preg_match($regex, $mail)==false) { return false; } else { return true; } 
    0
  3. zoup2code
     
    Solution on developpez.com dear nlx...

    (you here on howstuffworks.net!!! ^^)
    0
  4. Syrion
     
    Attention, RFC822 is NOT the current RFC for an email address.
    https://tools.ietf.org/html/rfc3696
    and its erratum:
    http://www.rfc-editor.org/cgi-bin/errataSearch.pl?rfc=3696

    Basically, for everything before the @, the following are allowed:
    - letters (uppercase AND lowercase, but it's the server that decides whether it distinguishes or not)
    - numbers
    - characters ! # $ % & ' * + - / = ? ^ _ ` . { | } ~

    Thus, Finances/pole_S&P/Jean.Valjean*flashbang*6+4=10@montfermeil.les-miserables.com is a VALID address.

    It is even possible to use spaces and \ by using quotes: "Jean Valjean"@les-miserables.com is a valid email address.
    -1
    1. sebsauvage Posted messages 33284 Registration date   Status Moderator Last intervention   15 684
       
      Thank you for the clarification.
      0
    2. olivier_t
       
      Oui, les caractères accentués sont autorisés.
      0
    3. Anonymous user
       
      Hello,

      No, accented characters are not allowed.

      Good afternoon,
      Alaedyna.
      --
      Don't forget to thank us if you want us to help you.
      × It's a harmful habit to strangle those you prefer. × [ Amélie Nothomb ]
      0
  5. céline03
     
    Salut, comment fais-tu pour créer une adresse mail sur Orange ? Merci de m'aider.
    0