shell bypass 403

GrazzMean-Shell Shell

Uname: Linux business55.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
Software: LiteSpeed
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.213.251.212
Your Ip: 18.191.255.180
User: allssztx (535) | Group: allssztx (533)
Safe Mode: OFF
Disable Function:
NONE

name : smtplib.cpython-313.pyc
�

*}g�����SrSSKrSSKrSSKrSSKrSSKrSSKrSSKrSSK	r	SSK
r
SSKrSSKrSSK
Jr /SQrSrSrSrSrS	rS
r\R."S\R05r"SS
\5r"SS\5r"SS\5r"SS\5r"SS\5r"SS\5r "SS\5r!"SS\5r""SS\5r#"SS\5r$S r%S!r&S"r'S#r(S$r)SSK*r*S%r+"S'S(5r-\+(a"S)S*\-5r.\R_S*5 S+r0"S,S-\-5r1\2S.:Xa�S/r3\3"S05r4\3"S15RkS25r6\7"S35 S4r8\RrRu5=r;(a(\8\;-r8\RrRu5=r;(aM(\7"S5\<"\85-5 \-"S65r=\=R}S75 \=R\4\6\85 \=R�5 gg!\,a S&r+GNf=f)8aSMTP/ESMTP client class.

This should follow RFC 821 (SMTP), RFC 1869 (ESMTP), RFC 2554 (SMTP
Authentication) and RFC 2487 (Secure SMTP over TLS).

Notes:

Please remember, when doing ESMTP, that the names of the SMTP service
extensions are NOT the same thing as the option keywords for the RCPT
and MAIL commands!

Example:

  >>> import smtplib
  >>> s=smtplib.SMTP("localhost")
  >>> print(s.help())
  This is Sendmail version 8.8.4
  Topics:
      HELO    EHLO    MAIL    RCPT    DATA
      RSET    NOOP    QUIT    HELP    VRFY
      EXPN    VERB    ETRN    DSN
  For more info use "HELP <topic>".
  To report bugs in the implementation send email to
      sendmail-bugs@sendmail.org.
  For local information send email to Postmaster at your site.
  End of HELP info
  >>> s.putcmd("vrfy","someone@here")
  >>> s.getreply()
  (250, "Somebody OverHere <somebody@here.my.org>")
  >>> s.quit()
�N)�body_encode)
�
SMTPException�SMTPNotSupportedError�SMTPServerDisconnected�SMTPResponseException�SMTPSenderRefused�SMTPRecipientsRefused�
SMTPDataError�SMTPConnectError�
SMTPHeloError�SMTPAuthenticationError�	quoteaddr�	quotedata�SMTP�i��
s
i �z	auth=(.*)c��\rSrSrSrSrg)r�Hz4Base class for all exceptions raised by this module.�N��__name__�
__module__�__qualname__�__firstlineno__�__doc__�__static_attributes__r��./opt/alt/python313/lib64/python3.13/smtplib.pyrrHs��>rrc��\rSrSrSrSrg)r�Kz�The command or option is not supported by the SMTP server.

This exception is raised when an attempt is made to run a command or a
command with an option which is not supported by the server.
rNrrrrrrK���rrc��\rSrSrSrSrg)r�Rz�Not connected to any SMTP server.

This exception is raised when the server unexpectedly disconnects,
or when an attempt is made to use the SMTP instance before
connecting it to a server.
rNrrrrrrRs��rrc��\rSrSrSrSrSrg)r�ZaBase class for all exceptions that include an SMTP error code.

These exceptions are generated in some instances when the SMTP
server returns an error code.  The error code is stored in the
`smtp_code' attribute of the error, and the `smtp_error' attribute
is set to the error message.
c�,�XlX lX4Ulg�N)�	smtp_code�
smtp_error�args)�self�code�msgs   r�__init__�SMTPResponseException.__init__cs�������K��	r)r+r)r*N�rrrrrr/rrrrrrZs��� rrc��\rSrSrSrSrSrg)r�hz�Sender address refused.

In addition to the attributes set by on all SMTPResponseException
exceptions, this sets `sender' to the string that the SMTP refused.
c�:�XlX lX0lXU4Ulgr()r)r*�senderr+)r,r-r.r5s    rr/�SMTPSenderRefused.__init__os����������'��	r)r+r5r)r*Nr1rrrrrhs���(rrc��\rSrSrSrSrSrg)r	�uz�All recipient addresses refused.

The errors for each recipient are accessible through the attribute
'recipients', which is a dictionary of exactly the same sort as
SMTP.sendmail() returns.
c� �XlU4Ulgr()�
recipientsr+)r,r:s  rr/�SMTPRecipientsRefused.__init__}s��$���M��	r)r+r:Nr1rrrr	r	us���"rr	c��\rSrSrSrSrg)r
�z'The SMTP server didn't accept the data.rNrrrrr
r
�s��1rr
c��\rSrSrSrSrg)r�z&Error during connection establishment.rNrrrrrr�s��0rrc��\rSrSrSrSrg)r�z"The server refused our HELO reply.rNrrrrrr�s��,rrc��\rSrSrSrSrg)r
�zjAuthentication error.

Most probably the server didn't accept the username/password
combination provided.
rNrrrrr
r
�r"rr
c��[RRU5upX4S:Xa+UR5R	S5(aU$SU-$SU-$)zQuote a subset of the email addresses defined by RFC 821.

Should be able to handle anything email.utils.parseaddr can handle.
��rF�<z<%s>)�email�utils�	parseaddr�strip�
startswith��
addrstring�displayname�addrs   rrr�s[��
���-�-�j�9��K���h�&�����(�(��-�-����
�"�"��D�=�rc�Z�[RRU5upX4S:XaU$U$)NrE)rHrIrJrMs   r�
_addr_onlyrR�s/�����-�-�j�9��K���h�&����Krc	�f�[R"SS[R"S[U55$)zuQuote data for email.

Double leading '.', and change Unix newline '\n', or Mac '\r' into
internet CRLF end-of-line.
z(?m)^\.z..�(?:\r\n|\n|\r(?!\n))��re�sub�CRLF��datas rrr�s*���6�6�*�d�
���&��d�3�5�5rc�2�[R"SSU5$)Ns(?m)^\.s..)rVrW)�bindatas r�_quote_periodsr]�s��
�6�6�+�u�g�.�.rc�:�[R"S[U5$)NrTrUrYs r�	_fix_eolsr_�s���F�F�*�D�$�7�7rTFc�~�\rSrSrSrSrSrSrSrSr	Sr
Sr\r
SSS\RS4SjrS	rS
rSrSrS
rS.SjrSrS/SjrSrS/SjrS/SjrS/SjrSrS/SjrSrSr Sr!S0Sjr"S0Sjr#Sr$Sr%\%r&Sr'Sr(S S!.S"jr)S1S#jr*S1S$jr+S1S%jr,S S!.S&jr-SS'.S(jr.S2S)jr/S3S*jr0S+r1S,r2S-r3g)4r�a\This class manages a connection to an SMTP or ESMTP server.
SMTP Objects:
    SMTP objects have the following attributes:
        helo_resp
            This is the message given by the server in response to the
            most recent HELO command.

        ehlo_resp
            This is the message given by the server in response to the
            most recent EHLO command. This is usually multiline.

        does_esmtp
            This is a True value _after you do an EHLO command_, if the
            server supports ESMTP.

        esmtp_features
            This is a dictionary, which, if the server supports ESMTP,
            will _after you do an EHLO command_, contain the names of the
            SMTP service extensions this server supports, and their
            parameters (if any).

            Note, all extension names are mapped to lower case in the
            dictionary.

    See each method's docstrings for details.  In general, there is a
    method of the same name to perform each SMTP command.  There is also a
    method called 'sendmail' that will do an entire mail transaction.
    rN�ehloFrFc��XlX@l0UlSUlXPlSUlU(a4UR
X5upgUS:waUR5 [Xg5eUbX0l	g[R"5nSU;aX�l	gSn	[R"[R"55n	SU	-Ul	g![Ra N!f=f)a�Initialize a new instance.

If specified, `host` is the name of the remote host to which to
connect.  If specified, `port` specifies the port to which to connect.
By default, smtplib.SMTP_PORT is used.  If a host is specified the
connect method is called, and if it returns anything other than a
success code an SMTPConnectError is raised.  If specified,
`local_hostname` is used as the FQDN of the local host in the HELO/EHLO
command.  Otherwise, the local hostname is found using
socket.getfqdn(). The `source_address` parameter takes a 2-tuple (host,
port) for the socket to bind to as its source address before
connecting. If the host is '' and port is 0, the OS default behavior
will be used.

�asciir��N�.z	127.0.0.1z[%s])�_host�timeout�esmtp_features�command_encoding�source_address�_auth_challenge_count�connect�closer�local_hostname�socket�getfqdn�
gethostbyname�gethostname�gaierror)
r,�host�portrorhrkr-r.�fqdnrPs
          rr/�
SMTP.__init__�s���$�
��� ��� '���,��%&��"���,�,�t�2�K�T��s�{��
�
��&�t�1�1��%�"0��
�>�>�#�D��d�{�&*�#�#���!�/�/��0B�0B�0D�E�D�'-�t�m��#��������s�)C�C�Cc��U$r(r�r,s r�	__enter__�SMTP.__enter__s���rc��URS5up#US:wa[X#5eUR5 g![a Nf=f!UR5 f=f)N�QUIT��)�docmdrrrn)r,r+r-�messages    r�__exit__�
SMTP.__exit__sY��	� �J�J�v�.�M�D��s�{�+�D�:�:��

�J�J�L��&�	��	��
�J�J�L�s&�$8�A�
A�A�A�A�Ac��Xlg)z�Set the debug output level.

A non-false value results in debug messages for connection and for all
messages sent to and received from the server.

N)�
debuglevel)r,r�s  r�set_debuglevel�SMTP.set_debuglevel"s	��%�rc���URS:�aH[[RR5R	5/UQ7S[
R06 g[US[
R06 g)N��file)r��print�datetime�now�time�sys�stderr�r,r+s  r�_print_debug�SMTP._print_debug+sM���?�?�Q���(�#�#�'�'�)�.�.�0�I�4�I�c�j�j�I��4�)�c�j�j�)rc���UbU(d[S5eURS:�aURSX4UR5 [R
"X4UUR5$)N�0Non-blocking socket (timeout=0) is not supportedrzconnect: to)�
ValueErrorr�r�rkrp�create_connection)r,rurvrhs    r�_get_socket�SMTP._get_socket1s`����w��O�P�P��?�?�Q�����m�d�\�4�;N�;N�O��'�'���g�(,�(;�(;�=�	=rc�&�U(aX0lU(dRURS5URS5:Xa.URS5nUS:�aUSUXS-Sp![U5nU(dURn[R"SXU5 URXUR5UlSUlUR5upVURS:�aURS[!U55 XV4$![a [S5ef=f)a@Connect to a host on a given port.

If the hostname ends with a colon (`:') followed by a number, and
there is no port specified, that suffix will be stripped off and the
number interpreted as the port number to use.

Note: This method is automatically invoked by __init__, if a host is
specified during instantiation.

�:rNr�znonnumeric portzsmtplib.connect�connect:)rk�find�rfind�intr��OSError�default_portr��auditr�rh�sockr��getreplyr�r��repr)r,rurvrk�ir-r.s       rrm�SMTP.connect;s����"0������3��4�:�:�c�?�:��
�
�3��A��A�v�!�"�1�X�t��E�F�|�d�5��t�9�D���$�$�D��	�	�#�T��6��$�$�T����>��	���	��m�m�o����?�?�Q�����j�$�s�)�4��{���"�5�!�"3�4�4�5�s�C:�:Dc��URS:�aURS[U55 UR(ad[	U[
5(aUR
UR5n[R"SX5 URRU5 g[S5e![a UR5 [S5ef=f)zSend `s' to the server.rzsend:zsmtplib.send�Server not connectedzplease run connect() firstN)r�r�r�r��
isinstance�str�encoderjr�r��sendallr�rnr)r,�ss  r�send�	SMTP.send\s����?�?�Q�����g�t�A�w�/��9�9��!�S�!�!��H�H�T�2�2�3���I�I�n�d�.�
E��	�	�!�!�!�$�
)�)E�F�F��	�
E��
�
��,�-C�D�D�
E�s�B,�,&Cc���US:XaUnOUSU3nSU;dSU;a0URSS5RSS5n[SU35eURU[35 g)	zSend a command to the server.rF� �
�
z\nz\rz=command and arguments contain prohibited newline characters: N)�replacer�r�rX)r,�cmdr+r�s    r�putcmd�SMTP.putcmdosu���2�:��A��%�q����A��1�9���	��	�	�$��&�.�.�t�U�;�A��O�PQ�s�S��
�	
�	�	�Q�C��v�,�rc�2�/nURc URRS5UlURR[S-5nU(dUR
5 [S5eURS:�aURS[U55 [U5[:�aUR
5 [SS	5eURUS
SRS55 USSn[!U5nUSS
S:waOM�SR%U5nURS:�aURSU<SU<35 XV4$![
a,nUR
5 [S[U5-5eSnAff=f!["a S
nM�f=f)apGet a reply from the server.

Returns a tuple consisting of:

  - server response code (e.g. '250', or such, if all goes well)
    Note: returns -1 if it can't read response code.

  - server response string corresponding to response code (multiline
    responses are converted to a single, multiline string).

Raises SMTPServerDisconnected if end-of-file is reached.
N�rbr�z Connection unexpectedly closed: zConnection unexpectedly closedrzreply:i�zLine too long.�s 	
�����-�
zreply: retcode (z); Msg: )r�r��makefile�readline�_MAXLINEr�rnrr�r�r�r��lenr�appendrKr�r��join)r,�resp�line�er-�errcode�errmsgs       rr��
SMTP.getreply|sx�����9�9���	�	�*�*�4�0�D�I��
7��y�y�)�)�(�Q�,�7��
��
�
��,�-M�N�N�����"��!�!�(�D��J�7��4�y�8�#��
�
��+�C�1A�B�B��K�K��Q�R����z�2�3����8�D�
��d�)��
�A�a�y�D� ��5�8���D�!���?�?�Q�������P�Q�����9�
7��
�
��,�-O�/2�1�v�.6�7�7��
7��$�
����
�s)�"E
�9F�
F�'E>�>F�F�Fc�D�URX5 UR5$)z-Send a command, and return its response code.�r�r�)r,r�r+s   rr��
SMTP.docmd�s�����C���}�}��rc��URSU=(d UR5 UR5up#X0lX#4$)z_SMTP 'helo' command.
Hostname to send for this command defaults to the FQDN of the local
host.
�helo)r�ror��	helo_resp)r,�namer-r.s    rr��	SMTP.helo�s7��
	
���F�D�7�D�$7�$7�8��m�m�o������{�rc�&�0UlURURU=(d UR5 UR	5up#US:Xa*[U5S:XaUR
5 [S5eX0lUS:waX#4$SUl	[UR[5(d[UR55eURRS5RS5nUS	UGHn[R!U5nU(aCURR#SS	5S
-UR%S5S-URS'Mc[&R "SU5nU(dM�UR)S5R+5nUR,UR/S5S
R15n	US:Xa2URR#US	5S
-U	-URU'GMX�RU'GM X#4$)z_SMTP 'ehlo' command.
Hostname to send for this command defaults to the FQDN of the local
host.
r�rr��Tzlatin-1r��authrFr�z((?P<feature>[A-Za-z0-9][A-Za-z0-9\-]*) ?�featureN)rir��ehlo_msgror�r�rnr�	ehlo_resp�
does_esmtpr��bytesr��decode�split�
OLDSTYLE_AUTH�match�get�groupsrV�group�lower�string�endrK)
r,r�r-r.r��each�
auth_match�mr��paramss
          rrb�	SMTP.ehlo�s���
!������D�M�M�4�#>�4�+>�+>�?��m�m�o����2�:�#�c�(�a�-��J�J�L�(�)?�@�@����3�;��;������$�.�.�%�0�0�F�$�t�~�~�2F�F�0��~�~�$�$�Y�/�5�5�d�;����G��D�'�,�,�T�2�J��.2�.A�.A�.E�.E�f�b�.Q��/� *� 1� 1�!� 4�Q� 7�/8��#�#�F�+�����D�d�K�A��q��'�'�)�,�2�2�4�����!�%�%�	�"2�"3�4�:�:�<���f�$�37�3F�3F�3J�3J�7�TV�3W�!�4"�$*�4+�D�'�'��0�4:�'�'��0�5�6�{�rc�<�UR5UR;$)z7Does the server support a given SMTP service extension?)r�ri)r,�opts  r�has_extn�
SMTP.has_extn�s���y�y�{�d�1�1�1�1rc�L�URSU5 UR5S$)z3SMTP 'help' command.
Returns help text from server.�helpr�r�r�s  rr��	SMTP.help�s#��	
���F�D�!��}�}��q�!�!rc�2�SUlURS5$)z&SMTP 'rset' command -- resets session.rd�rset)rjr�rzs rr��	SMTP.rset�s�� '����z�z�&�!�!rc�F�UR5 g![a gf=f)z�Internal 'rset' command which ignores any SMTPServerDisconnected error.

Used internally in the library, since the server disconnected error
should appear to the application when the *next* command is issued, if
we are doing an internal "safety" reset.
N)r�rrzs r�_rset�
SMTP._rset�s"��	��I�I�K��%�	��	�s��
 � c�$�URS5$)z-SMTP 'noop' command -- doesn't do anything :>�noop)r�rzs rr��	SMTP.noops���z�z�&�!�!rc�B�SnU(aeUR(aT[SU55(a)URS5(aSUlO[	S5eSSRU5-nUR
SS[U5<U<35 UR5$)	aSMTP 'mail' command -- begins mail xfer session.

This method may raise the following exceptions:

 SMTPNotSupportedError  The options parameter includes 'SMTPUTF8'
                        but the SMTPUTF8 extension is not supported by
                        the server.
rFc3�F# �UHoR5S:Hv� M g7f)�smtputf8N)r�)�.0�xs  r�	<genexpr>�SMTP.mail.<locals>.<genexpr>s���:�'�Q�7�7�9�j�(�'�s�!r�zutf-8z SMTPUTF8 not supported by serverr��mailzfrom:)	r��anyr�rjrr�r�rr�)r,r5�options�
optionlists    rr�	SMTP.mails����
��t����:�'�:�:�:��=�=��,�,�,3�D�)�/�:�<�<��s�x�x��0�0�J����F�9�V�+<�j�I�J��}�}��rc���SnU(a%UR(aSSRU5-nURSS[U5<U<35 UR	5$)z;SMTP 'rcpt' command -- indicates 1 recipient for this mail.rFr��rcptzto:)r�r�r�rr�)r,�reciprrs    rr�	SMTP.rcpt$sG���
��t����s�x�x��0�0�J����F��5�)9�:�F�G��}�}��rc��URS5 UR5up#URS:�aURSX#45 US:wa[	X#5e[U[5(a[U5RS5n[U5nUSS[:wa	U[-nUS-[-nURU5 UR5up!URS:�aURSX!45 X!4$)	a�SMTP 'DATA' command -- sends message data to server.

Automatically quotes lines beginning with a period per rfc821.
Raises SMTPDataError if there is an unexpected reply to the
DATA command; the return value from this method is the final
response code received when the all data is sent.  If msg
is a string, lone '\r' and '\n' characters are converted to
'\r\n' characters.  If msg is bytes, it is transmitted as is.
rZrzdata:ibrd���N�.)r�r�r�r�r
r�r�r_r�r]�bCRLFr�)r,r.r-�repl�qs     rrZ�	SMTP.data,s���	
���F���}�}�����?�?�Q�����g��|�4��3�;���+�+��#�s�#�#���n�+�+�G�4���s�#�A����v�����I���D��5� �A��I�I�a�L��-�-�/�K�T�����"��!�!�'�D�;�7��;�rc�X�URS[U55 UR5$)z5SMTP 'verify' command -- checks for address validity.�vrfy�r�rRr��r,�addresss  r�verify�SMTP.verifyI�!�����F�J�w�/�0��}�}��rc�X�URS[U55 UR5$)z.SMTP 'expn' command -- expands a mailing list.�expnrrs  rr�	SMTP.expnPrrc���URc\URcNSUR5Ss=::aS::d/O UR5upSUs=::aS::d
O [	X5egggg)a2Call self.ehlo() and/or self.helo() if needed.

If there has been no previous EHLO or HELO command this session, this
method tries ESMTP EHLO first.

This method may raise the following exceptions:

 SMTPHeloError            The server didn't reply properly to
                          the helo greeting.
N��ri+)r�r�rbr�r)r,r-r�s   r�ehlo_or_helo_if_needed�SMTP.ehlo_or_helo_if_neededWse���>�>�!�d�n�n�&<��4�9�9�;�q�>�0�S�0�#�y�y�{����t�*�s�*�'��3�3�+�1�'=�!rT��initial_response_okc�J�UR5nU(aU"5OSnUb;[URS5SS9nURSUS-U-5upgSUlOURSU5upgSUlUS	:Xa�U=RS-
sl[
R"U5n[U"U5RS5SS9nURU5upgUR[:�a[S
[Xg45-5eUS	:XaM�US;aXg4$[Xg5e)a�Authentication command - requires response processing.

'mechanism' specifies which authentication mechanism is to
be used - the valid values are those listed in the 'auth'
element of 'esmtp_features'.

'authobject' must be a callable object taking a single argument:

        data = authobject(challenge)

It will be called to process the server's challenge response; the
challenge argument it is passed will be a bytes.  It should return
an ASCII string that will be base64 encoded and sent to the server.

Keyword arguments:
    - initial_response_ok: Allow sending the RFC 4954 initial-response
      to the AUTH command, if the authentication methods supports it.
NrdrF)�eol�AUTHr�r�riNz4Server AUTH mechanism infinite loop. Last response: ���i�)�upper�
encode_base64r�r�rl�base64�decodebytes�
_MAXCHALLENGErr�r
)	r,�	mechanism�
authobjectr"�initial_response�responser-r��	challenges	         rr��	SMTP.authhs!��,�O�O�%�	�,?�J�L�T���'�$�%5�%<�%<�W�%E�2�N�H��:�:�f�i�#�o��.H�I�L�T�)*�D�&��:�:�f�i�8�L�T�)*�D�&��c�k��&�&�!�+�&��*�*�4�0�I�$��9�%�,�,�W�5�2�?�H��:�:�h�/�L�T��)�)�M�9�#�J��D�<�(�)����c�k��:���<��%�d�1�1rc��UcgURS-[R"URR	S5US5R5-$)z_Authobject to use with CRAM-MD5 authentication. Requires self.user
and self.password to be set.Nr�rd�md5)�user�hmac�HMAC�passwordr��	hexdigest�r,r1s  r�
auth_cram_md5�SMTP.auth_cram_md5�sL������y�y�3������M�M� � ��)�9�e�"=�=F�Y�[�I�	Irc�>�SUR<SUR<3$)z\Authobject to use with PLAIN authentication. Requires self.user and
self.password to be set.�)r5r8r:s  r�
auth_plain�SMTP.auth_plain�s��"�Y�Y��
�
�6�6rc�X�UbURS:aUR$UR$)z\Authobject to use with LOGIN authentication. Requires self.user and
self.password to be set.�)rlr5r8r:s  r�
auth_login�SMTP.auth_login�s+����� :� :�Q� >��9�9���=�=� rc��UR5 URS5(d[S5eURSR	5n/SQnUVs/sHnXd;dM
UPM nnU(d[S5eXsUlUlUHNnSUR5RSS5-n	URU[X	5US9up�U
S	;aX�4s $MP W
es snf![a
nUn
S
nAMkS
nAff=f)a�Log in on an SMTP server that requires authentication.

The arguments are:
    - user:         The user name to authenticate with.
    - password:     The password for the authentication.

Keyword arguments:
    - initial_response_ok: Allow sending the RFC 4954 initial-response
      to the AUTH command, if the authentication methods supports it.

If there has been no previous EHLO or HELO command this session, this
method tries ESMTP EHLO first.

This method will return normally if the authentication was successful.

This method may raise the following exceptions:

 SMTPHeloError            The server didn't reply properly to
                          the helo greeting.
 SMTPAuthenticationError  The server didn't accept the username/
                          password combination.
 SMTPNotSupportedError    The AUTH command is not supported by the
                          server.
 SMTPException            No suitable authentication method was
                          found.
r�z,SMTP AUTH extension not supported by server.)zCRAM-MD5�PLAIN�LOGINz(No suitable authentication method found.�auth_�-�_r!r&N)
rr�rrir�rr5r8r�r�r��getattrr
)r,r5r8r"�advertised_authlist�preferred_authsr��authlist�
authmethod�method_namer-r�r��last_exceptions              r�login�
SMTP.login�s"��8	
�#�#�%��}�}�V�$�$�'�>�@�
@�#�1�1�&�9�?�?�A��9��&5�4�_�T��2��_��4��� J�K�K�
$(� ��	�4�=�"�J�!�J�$4�$4�$6�$>�$>�s�C�$H�H�K�	
#�#�y�y���� :�(;� )� =���
�:�%� �<�'�&�#����/4��&+�
#�!"���
#�s$�	C"�$C"�5$C'�'
C>�1C9�9C>��contextc��UR5 URS5(d[S5eURS5up#US:Xa}[(d[S5eUc[R"5nURURURS9Ul	SUlSUlSUl
0UlSUlX#4$[!X#5e)	a;Puts the connection to the SMTP server into TLS mode.

If there has been no previous EHLO or HELO command this session, this
method tries ESMTP EHLO first.

If the server supports TLS, this will encrypt the rest of the SMTP
session. If you provide the context parameter,
the identity of the SMTP server and client can be checked. This,
however, depends on whether the socket module really checks the
certificates.

This method may raise the following exceptions:

 SMTPHeloError            The server didn't reply properly to
                          the helo greeting.
�starttlsz+STARTTLS extension not supported by server.�STARTTLSrez&No SSL support included in this PythonN��server_hostnameF)rr�rr��	_have_ssl�RuntimeError�ssl�_create_stdlib_context�wrap_socketr�rgr�r�r�rir�r)r,rUr��replys    rrW�
SMTP.starttls�s���"	
�#�#�%��}�}�Z�(�(�'�=�?�
?��
�
�:�.�
���3�;��9�"�#K�L�L����4�4�6���+�+�D�I�I�<@�J�J�,�H�D�I��D�I�
"�D�N�!�D�N�"$�D��#�D�O��}��(��4�4rc��UR5 /n[U[5(a[U5R	S5nUR
(aMUR
S5(aURS[U5-5 UHnURU5 M URX5up�US:wa3US:XaUR5 OUR5 [X�U5e0n
[U[5(aU/nUHHnURX�5up�US:waUS:waX�4X�'US:XdM/UR5 [U
5e [U
5[U5:XaUR5 [U
5eURU5up�US:wa2US:XaUR5 OUR5 [!X�5eU
$)a�	This command performs an entire mail transaction.

The arguments are:
    - from_addr    : The address sending this mail.
    - to_addrs     : A list of addresses to send this mail to.  A bare
                     string will be treated as a list with 1 address.
    - msg          : The message to send.
    - mail_options : List of ESMTP options (such as 8bitmime) for the
                     mail command.
    - rcpt_options : List of ESMTP options (such as DSN commands) for
                     all the rcpt commands.

msg may be a string containing characters in the ASCII range, or a byte
string.  A string is encoded to bytes using the ascii codec, and lone
\r and \n characters are converted to \r\n characters.

If there has been no previous EHLO or HELO command this session, this
method tries ESMTP EHLO first.  If the server does ESMTP, message size
and each of the specified options will be passed to it.  If EHLO
fails, HELO will be tried and ESMTP options suppressed.

This method will return normally if the mail is accepted for at least
one recipient.  It returns a dictionary, with one entry for each
recipient that was refused.  Each entry contains a tuple of the SMTP
error code and the accompanying error message sent by the server.

This method may raise the following exceptions:

 SMTPHeloError          The server didn't reply properly to
                        the helo greeting.
 SMTPRecipientsRefused  The server rejected ALL recipients
                        (no mail was sent).
 SMTPSenderRefused      The server didn't accept the from_addr.
 SMTPDataError          The server replied with an unexpected
                        error code (other than a refusal of
                        a recipient).
 SMTPNotSupportedError  The mail_options parameter includes 'SMTPUTF8'
                        but the SMTPUTF8 extension is not supported by
                        the server.

Note: the connection will be open even after an exception is raised.

Example:

 >>> import smtplib
 >>> s=smtplib.SMTP("localhost")
 >>> tolist=["one@one.org","two@two.org","three@three.org","four@four.org"]
 >>> msg = '''\
 ... From: Me@my.org
 ... Subject: testin'...
 ...
 ... This is a test '''
 >>> s.sendmail("me@my.org",tolist,msg)
 { "three@three.org" : ( 550 ,"User unknown" ) }
 >>> s.quit()

In the above example, the message was accepted for delivery to three
of the four addresses, and one was rejected, with the error code
550.  If all addresses are accepted, then the method will return an
empty dictionary.

rd�sizezsize=%dr�i��)rr�r�r_r�r�r�r�r�rrnr�rrr	rZr
)r,�	from_addr�to_addrsr.�mail_options�rcpt_options�
esmtp_opts�optionr-r��senderrsr�s            r�sendmail�
SMTP.sendmails���@	
�#�#�%��
��c�3����C�.�'�'��0�C��?�?��}�}�V�$�$��!�!�)�c�#�h�"6�7�&���!�!�&�)�'��y�y��7����3�;��s�{��
�
���
�
��#�D�	�:�:����h��$�$� �z�H��D��9�9�T�8�L�T����$�#�+�"&�����s�{��
�
��+�H�5�5�
��x�=�C��M�)��J�J�L�'��1�1��y�y��~����3�;��s�{��
�
���
�
����+�+��rc�P�UR5 URS5nUcSnO[U5S:XaSnO[S5eUc=US-U;aXS-OXS-n[R
R
U/5S	SnUcZXS
-XS-XS-4Vs/sH
nUcMUPM n	n[R
R
U	5V
s/sHo�SPM	 nn
[R"U5nUS	US
	SnSRU/UQ5RS5 [R"5n
U(a>[RR!X�R"R%SS9S9n/UQSPSP7nO[RR!U
5nUR'USS9 U
R)5nSSS5 UR+X#WUU5$s snfs sn
f![a& URS5(d[S5eSnN�f=f!,(df   N_=f)a�Converts message to a bytestring and passes it to sendmail.

The arguments are as for sendmail, except that msg is an
email.message.Message object.  If from_addr is None or to_addrs is
None, these arguments are taken from the headers of the Message as
described in RFC 2822 (a ValueError is raised if there is more than
one set of 'Resent-' headers).  Regardless of the values of from_addr and
to_addr, any Bcc field (or Resent-Bcc field, when the Message is a
resent) of the Message object won't be transmitted.  The Message
object is then serialized using email.generator.BytesGenerator and
sendmail is called to transmit the message.  If the sender or any of
the recipient addresses contain non-ASCII and the server advertises the
SMTPUTF8 capability, the policy is cloned with utf8 set to True for the
serialization, and SMTPUTF8 and BODY=8BITMIME are asserted on the send.
If the server does not support SMTPUTF8, an SMTPNotSupported error is
raised.  Otherwise the generator is called without modifying the
policy.

zResent-DateNrFr�zResent-z0message has more than one 'Resent-' header block�Sender�Fromr�To�Bcc�Ccz
Resent-BccFrdr�z�One or more source or delivery addresses require internationalized email support, but the server does not advertise the required SMTPUTF8 capabilityT)�utf8)�policy�SMTPUTF8z
BODY=8BITMIMEr)�linesep)r�get_allr�r�rHrI�getaddresses�copyr�r��UnicodeEncodeErrorr�r�io�BytesIO�	generator�BytesGeneratorru�clone�flatten�getvaluerl)r,r.rerfrgrh�resent�
header_prefix�f�addr_fields�a�msg_copy�
international�bytesmsg�g�flatmsgs                r�send_message�SMTP.send_message�sN��>	
�#�#�%����]�+���>��M�
��[�A�
�%�M��O�P�P��� -�x�7�C�?��X�5�6� #�F�$:� ;�
����0�0�)��=�a�@��C�I���'*�4�+?�'@�'*�5�+@�'A�'*�4�+?�'@�'B�-�'B�� ��'B�K�-�',�k�k�&>�&>�{�&K�L�&K��!��&K�H�L��9�9�S�>���U�O��\�"��
�	!��G�G�Y�*��*�+�2�2�7�;��Z�Z�\�X���O�O�2�2��Z�Z�%5�%5�4�%5�%@�3�B��K��K�z�K�?�K���O�O�2�2�8�<��
�I�I�h��I�/��'�'�)�G���}�}�Y�'�<�)�+�	+��9-��M��"�	!��=�=��,�,�+�K�L�L�!�M�
	!���\�s1�G�)G�G�#G$�9BH�$-H�H�
H%c��URnSUlU(aUR5 URnSUlU(aUR5 gg!URnSUlU(aUR5 ff=f)z(Close the connection to the SMTP server.N)r�rnr�)r,r�r�s   rrn�
SMTP.close�si��		��9�9�D��D�I���
�
���9�9�D��D�I���
�
�����9�9�D��D�I���
�
���s�*A�-Bc��URS5nS=UlUl0UlSUlUR5 U$)zTerminate the SMTP session.�quitNF)r�r�r�rir�rn)r,�ress  rr��	SMTP.quit�s;���j�j�� ��*.�.����� �������
�
���
r)rlrgrjr�r�r�rir�r�ror8r�rkrhr5��	localhostrN)rF)rr()rr)NNrr)4rrrrrr�r�r�r�r�r�r��	SMTP_PORTr�rp�_GLOBAL_DEFAULT_TIMEOUTr/r{r�r�r�r�rmr�r�r�r�r�rbr�r�r�r�r�rrrZrrrrr�r;r?rCrRrWrlr�rnr�rrrrrr�s&���8�J��D��D��I��H��I��J��L��Q�t��7�7� $�.4�`��%�*�=��BG�& �/�b��1�f2�"�"�

�"��*��:�
�D��4�"BF�.2�`I�7�
!�<@�@�D#'�+�Z?A� �f�P:>�35�K+�Z�rrc�Z^�\rSrSrSr\rS\RSSS.Sjjr	U4Sjr
SrU=r$)	�SMTP_SSLi�a�This is a subclass derived from SMTP that connects over an SSL
encrypted socket (to use this class you need a socket module that was
compiled with SSL support). If host is not specified, '' (the local
host) is used. If port is omitted, the standard SMTP-over-SSL port
(465) is used.  local_hostname and source_address have the same meaning
as they do in the SMTP class.  context also optional, can contain a
SSLContext.

N)rhrkrUc�p�Uc[R"5nX`l[R	XX#UU5 gr()r]r^rUrr/)r,rurvrorhrkrUs       rr/�SMTP_SSL.__init__�s1�����4�4�6��"�L��M�M�$�d�G�(�
*rc�>�URS:�aURSX45 [TU]
XU5nURRUURS9nU$)Nrr�rY)r�r��superr�rUr_rg)r,rurvrh�
new_socket�	__class__s     �rr��SMTP_SSL._get_sockets[�������"��!�!�*�t�l�;���,�T��A�J����1�1�*�BF�*�*�2�N�J��rrT)rFrN)
rrrrr�
SMTP_SSL_PORTr�rpr�r/r�r�
__classcell__�r�s@rr�r��s1���	�%��	*� &� >� >�$(�$�	*�	�	rr�i�c�b^�\rSrSrSrSrS\SS\R4U4Sjjr	S	U4Sjjr
SrU=r$)
�LMTPiaeLMTP - Local Mail Transfer Protocol

The LMTP protocol, which is very similar to ESMTP, is heavily based
on the standard SMTP client. It's common to use Unix sockets for
LMTP, so our connect() method must support that as well as a regular
host:port server.  local_hostname and source_address have the same
meaning as they do in the SMTP class.  To specify a Unix socket,
you must use an absolute path as the host, starting with a '/'.

Authentication is supported, using the regular SMTP mechanism. When
using a Unix socket, LMTP generally don't support or require any
authentication, but your mileage might vary.�lhlorFNc�$>�[TU]XUXES9 g)zInitialize a new instance.)rorkrhN)r�r/)r,rurvrorkrhr�s      �rr/�
LMTP.__init__ s���	����N�(6�	�	Irc��>�USS:wa[TU]XUS9$URbUR(d[S5e[R"[R
[R5UlUR[RLa%URRUR5 SUl
URRU5 UR5upEURS:�aURSU5 XE4$![aV URS:�aURSU5 UR(aURR5 SUlef=f)z=Connect to the LMTP daemon, on either a Unix or a TCP socket.r�/)rkNr�z
connect fail:r�)r�rmrhr�rp�AF_UNIX�SOCK_STREAMr�r��
settimeoutr�r�r�r�rnr�)r,rurvrkr-r.r�s      �rrm�LMTP.connect&s�����7�c�>��7�?�4�n�?�M�M��<�<�#�D�L�L��O�P�P�	��
�
�f�n�n�f�6H�6H�I�D�I��|�|�6�#A�#A�A��	�	�$�$�T�\�\�2��D�I��I�I���d�#��m�m�o����?�?�Q�����j�#�.��{����	�����"��!�!�/�4�8��y�y��	�	���!��D�I��
	�s�BD�A E6)r�r�r�)
rrrrrr��	LMTP_PORTrpr�r/rmrr�r�s@rr�r�s1���4��H��Y�t� $�f�.L�.L�I��rr��__main__c���[RRUS-5 [RR5 [RR5R
5$)Nz: )r��stdout�write�flush�stdinr�rK)�prompts rr�r�EsD���
�
����$��'��
�
�����y�y�!�!�#�)�)�+�+rrprq�,zEnter message, end with ^D:rFzMessage length is %dr�r�)Arrpr|rV�email.utilsrH�
email.message�email.generatorr*r6rzr�r��email.base64mimerr)�__all__r�r�rXrr�r,�compile�Ir�r�rrrrrr	r
rrr
rrRrr]r_r]r[�ImportErrorrr�r�r�r�rr��fromaddrr��toaddrsr�r.r�r�r�r��serverr�rlr�rrr�<module>r�s'���R�	�	����
����
�9�-��

�	��
�
�������
��
�
�<����.�
�?�G�?��M���]�� �M� �(�-�(�
"�M�
"�2�)�2�1�,�1�-�)�-��3����5�/�8����I�i�i�V
��4��<�N�N�:��

�	�/�4�/�h�z��,�
�f�~�H��T�l� � ��%�G�	�
'�(�
�C��)�)�$�$�&�
&�$�
&��D�j���)�)�$�$�&�
&�$�
&�	�
 �3�s�8�
+�,�
�+�
�F�
���!��
�O�O�H�g�s�+�
�K�K�M�#��Y���I��s� G*�*G6�5G6
© 2025 GrazzMean-Shell