HEX
Server: LiteSpeed
System: Linux us-phx-web1284.main-hosting.eu 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: u300739242 (300739242)
PHP: 8.2.30
Disabled: system, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
Upload Files
File: //opt/alt/python311/lib/python3.11/site-packages/validators/__pycache__/email.cpython-311.pyc
�

�;f�
��h�dZddlZddlmZddlmZedddddd�ded	ed
ededed
efd���ZdS)zeMail.�N�)�hostname)�	validatorF)�ipv6_address�ipv4_address�simple_host�rfc_1034�rfc_2782�valuerrrr	r
c��|r|�d��dkrdS|�dd��\}}t|��dkst|��dkrdS|s|rU|�d��r>|�d��r)|�d���d��}ndStjd|tj	��r%tt|||d|||�	����ndS)
a�Validate an email address.

    This was inspired from [Django's email validator][1].
    Also ref: [RFC 1034][2], [RFC 5321][3] and [RFC 5322][4].

    [1]: https://github.com/django/django/blob/main/django/core/validators.py#L174
    [2]: https://www.rfc-editor.org/rfc/rfc1034
    [3]: https://www.rfc-editor.org/rfc/rfc5321
    [4]: https://www.rfc-editor.org/rfc/rfc5322

    Examples:
        >>> email('someone@example.com')
        # Output: True
        >>> email('bogus@@')
        # Output: ValidationError(email=email, args={'value': 'bogus@@'})

    Args:
        value:
            eMail string to validate.
        ipv6_address:
            When the domain part is an IPv6 address.
        ipv4_address:
            When the domain part is an IPv4 address.
        simple_host:
            When the domain part is a simple hostname.
        rfc_1034:
            Allow trailing dot in domain name.
            Ref: [RFC 1034](https://www.rfc-editor.org/rfc/rfc1034).
        rfc_2782:
            Domain name is of type service record.
            Ref: [RFC 2782](https://www.rfc-editor.org/rfc/rfc2782).

    Returns:
        (Literal[True]): If `value` is a valid eMail.
        (ValidationError): If `value` is an invalid eMail.
    �@rF�@��[�]z�(^[\u0100-\u017F\u0180-\u024F]|[-!#$%&'*+/=?^_`{}|~0-9a-z]+(\.[-!#$%&'*+/=?^_`{}|~0-9a-z]+)*$|^"([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\011.])*"$))�skip_ipv6_addr�skip_ipv4_addr�
may_have_port�maybe_simpler	r
)�count�rsplit�len�
startswith�endswith�lstrip�rstrip�re�match�
IGNORECASE�boolr)rrrrr	r
�
username_part�domain_parts        �C/opt/alt/python311/lib/python3.11/site-packages/validators/email.py�emailr$s:��^��E�K�K��$�$��)�)��u�!&���c�1�!5�!5��M�;�
�=���B���#�k�"2�"2�S�"8�"8��u���|���!�!�#�&�&�	�;�+?�+?��+D�+D�	�%�,�,�S�1�1�8�8��=�=�K�K��5��8�
M�

��M�	
�	
�	����#/�/�#/�/�#�(�!�!�
�
�
�
	
�
	
�
	
�*�-�)�__doc__rr�utilsr�strr r$�r%r#�<module>r*s�����
�	�	�	��������������
�����U�U�U��U��	U�
�U��
U��U��U�U�U���U�U�Ur%