https://t.me/AnonymousX5
Server : Apache
System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64
User : njnconst ( 1116)
PHP Version : 8.4.18
Disable Function : NONE
Directory :  /lib64/python2.7/site-packages/django/core/mail/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib64/python2.7/site-packages/django/core/mail/message.pyc
�
r�\c@sddlmZddlZddlZddlZddlZddlZddlmZddlm	Z
mZddl
mZddlmZddlmZddlmZdd	lmZmZmZmZdd
lmZddlmZddlmZdd
l m!Z!e
j
d�Z"de"_$dZ%de&fd��YZ'dd�Z(e)dddddddddddg�Z*d�Z+d�Z,d d*d!��YZ-d"e-efd#��YZ.d$e-efd%��YZ/d&e0fd'��YZ1d(e1fd)��YZ2dS(+i����(tunicode_literalsN(t	generator(tcharsettencoders(tMIMEText(t
MIMEMultipart(tMIMEBase(tHeader(t
formatdatetgetaddressest
formataddrt	parseaddr(tsettings(tDNS_NAME(t
force_text(tsixuutf-8uapplication/octet-streamtBadHeaderErrorcBseZRS((t__name__t
__module__(((s:/tmp/pip-install-XxeQeY/django/django/core/mail/message.pyR!scCs�tj�}tjdtj|��}ytj�}Wntk
rPd}nXtjd�}|dkrud}n
d|}t	}d|||||f}|S(u�Returns a string suitable for RFC 2822 compliant Message-ID, e.g:

    <20020201195627.33539.96671@nightshade.la.mastaler.com>

    Optional idstring if given is a string used to strengthen the
    uniqueness of the message id.
    u%Y%m%d%H%M%Sii��uu.u<%s.%s.%s%s@%s>N(
ttimetstrftimetgmtimetostgetpidtAttributeErrortrandomt	randrangetNoneR
(tidstringttimevaltutcdatetpidtrandinttidhosttmsgid((s:/tmp/pip-install-XxeQeY/django/django/core/mail/message.pyt
make_msgid(s

	
ufromusenderureply-toutouccubccuresent-fromu
resent-senderu	resent-tou	resent-ccu
resent-bcccs��ptj�t|�}d|ks3d|krLtd||f��ny|jd�Wnctk
r�|j�tkr�dj�fd�t	|f�D��}q�t
|��j�}n(X|j�dkr�t
|�j�}nt|�|fS(u8Forbids multi-line headers, to prevent header injection.u
u
u;Header values can't contain newlines (got %r for header %r)uasciiu, c3s|]}t|��VqdS(N(tsanitize_address(t.0taddr(tencoding(s:/tmp/pip-install-XxeQeY/django/django/core/mail/message.pys	<genexpr>[susubject(RtDEFAULT_CHARSETRRtencodetUnicodeEncodeErrortlowertADDRESS_HEADERStjoinR	Rtstr(tnametvalR'((R's:/tmp/pip-install-XxeQeY/django/django/core/mail/message.pytforbid_multi_line_headersQs
cCs(t|tj�r'tt|��}n|\}}yt||�j�}Wn&tk
rtt|d�j�}nXy|jd�Wn�tk
rd|kr�|jdd�\}}t	t||��}|jd�j
d�}dj||g�}qt||�j�}nXt||f�S(Nuutf-8uasciiu@iuidna(
t
isinstanceRtstring_typesRRRR)R*tsplitR.tdecodeR-R
(R&R'tnmt	localparttdomain((s:/tmp/pip-install-XxeQeY/django/django/core/mail/message.pyR$es"

t	MIMEMixincBs2eZed�Zejr$eZned�ZRS(cCs�tj�}tj|dt�}tjdkrct|jtj	�rc|jj
|jj�|_n|j
|d|�|j�S(u&Return the entire formatted message as a string.
        Optional `unixfrom' when True, means include the Unix From_ envelope
        header.

        This overrides the default as_string() implementation to not mangle
        lines that begin with 'From '. See bug #13433 for details.
        tmangle_from_iitunixfrom(iii(RtStringIORt	GeneratortFalsetsystversion_infoR2t_payloadt	text_typeR)t_charsettoutput_charsettflattentgetvalue(tselfR;tfptg((s:/tmp/pip-install-XxeQeY/django/django/core/mail/message.pyt	as_string}s$cCs>tj�}tj|dt�}|j|d|�|j�S(u6Return the entire formatted message as bytes.
            Optional `unixfrom' when True, means include the Unix From_ envelope
            header.

            This overrides the default as_bytes() implementation to not mangle
            lines that begin with 'From '. See bug #13433 for details.
            R:R;(RtBytesIORtBytesGeneratorR>RERF(RGR;RHRI((s:/tmp/pip-install-XxeQeY/django/django/core/mail/message.pytas_bytes�s(RRR>RJRtPY2RM(((s:/tmp/pip-install-XxeQeY/django/django/core/mail/message.pyR9|s		tSafeMIMETextcBseZd�Zd�ZRS(cCs�||_|dkr�tj|||d�|d=d
tjkoLdknr�|jtj�}|j	dd�|_
|jt�n|j|t�|j
dd	||f�ntj||||�dS(Nuutf-8uContent-Transfer-EncodingiiiuasciiusurrogateescapeuContent-Typeutext/%s; charset="%s"(ii(iii(R'Rt__init__RR?R@R)tutf8_charsetRDR5RAtset_charsettset_payloadtreplace_header(RGttexttsubtypeRtpayload((s:/tmp/pip-install-XxeQeY/django/django/core/mail/message.pyRP�s	cCs2t|||j�\}}tj|||�dS(N(R1R'Rt__setitem__(RGR/R0((s:/tmp/pip-install-XxeQeY/django/django/core/mail/message.pyRX�s(RRRPRX(((s:/tmp/pip-install-XxeQeY/django/django/core/mail/message.pyRO�s	tSafeMIMEMultipartcBs&eZddddd�Zd�ZRS(umixedcKs&||_tj|||||�dS(N(R'RRP(RGt_subtypetboundaryt	_subpartsR't_params((s:/tmp/pip-install-XxeQeY/django/django/core/mail/message.pyRP�s	cCs2t|||j�\}}tj|||�dS(N(R1R'RRX(RGR/R0((s:/tmp/pip-install-XxeQeY/django/django/core/mail/message.pyRX�sN(RRRRPRX(((s:/tmp/pip-install-XxeQeY/django/django/core/mail/message.pyRY�stEmailMessagec
Bs�eZdZdZdZdZdddddddddd�	Zed�Z	d�Z
d�Zed�Zdddd	�Z
dd
�Zd�Zd�Zd
�Zdd�ZRS(u,
    A container for email information.
    uplainumixeduc

Cs|r7t|tj�s%td��t|�|_n	g|_|	rwt|	tj�setd��t|	�|_n	g|_|r�t|tj�s�td��t|�|_n	g|_|p�tj	|_
||_||_|p�g|_
|p�i|_||_dS(u
        Initialize a single email message (which can be sent to multiple
        recipients).

        All strings used to create the message can be unicode strings
        (or UTF-8 bytestrings). The SafeMIMEText class will handle any
        necessary encoding conversions.
        u%"to" argument must be a list or tupleu%"cc" argument must be a list or tupleu&"bcc" argument must be a list or tupleN(R2RR3tAssertionErrortlistttotcctbccRtDEFAULT_FROM_EMAILt
from_emailtsubjecttbodytattachmentst
extra_headerst
connection(
RGRfRgReRaRcRjRhtheadersRb((s:/tmp/pip-install-XxeQeY/django/django/core/mail/message.pyRP�s$
					cCs5ddlm}|js.|d|�|_n|jS(Ni����(tget_connectiont
fail_silently(tdjango.core.mailRlRj(RGRmRl((s:/tmp/pip-install-XxeQeY/django/django/core/mail/message.pyRl�s	cCsI|jptj}t|j|j|�}|j|�}|j|d<|jj	d|j
�|d<|jj	ddj|j��|d<|j
r�dj|j
�|d<ng|jD]}|j�^q�}d|kr�t�|d<nd|krt�|d	<nx?|jj�D].\}}|j�dkr7qn|||<qW|S(
NuSubjectuFromuTou, uCcudateuDateu
message-idu
Message-IDufromuto(ufromuto(R'RR(RORgtcontent_subtypet_create_messageRfRitgetReR-RaRbR+RR#titems(RGR'tmsgtkeytheader_namesR/tvalue((s:/tmp/pip-install-XxeQeY/django/django/core/mail/message.pytmessage�s$
%	"cCs|j|j|jS(u�
        Returns a list of all recipients of the email (includes direct
        addressees as well as Cc and Bcc entries).
        (RaRbRc(RG((s:/tmp/pip-install-XxeQeY/django/django/core/mail/message.pyt
recipientsscCs)|j�sdS|j|�j|g�S(uSends the email message.i(RxRlt
send_messages(RGRm((s:/tmp/pip-install-XxeQeY/django/django/core/mail/message.pytsendscCsst|t�rD||ko&dkns1t�|jj|�n+|dk	sVt�|jj|||f�dS(u
        Attaches a file with the given filename and content. The filename can
        be omitted and the mimetype is guessed, if not provided.

        If the first parameter is a MIMEBase subclass it is inserted directly
        into the resulting message attachments.
        N(R2RRR_Rhtappend(RGtfilenametcontenttmimetype((s:/tmp/pip-install-XxeQeY/django/django/core/mail/message.pytattachs
"cCsMtjj|�}t|d��}|j�}WdQX|j|||�dS(u$Attaches a file from the filesystem.urbN(RtpathtbasenametopentreadR(RGR�R~R|tfR}((s:/tmp/pip-install-XxeQeY/django/django/core/mail/message.pytattach_file%scCs
|j|�S(N(t_create_attachments(RGRs((s:/tmp/pip-install-XxeQeY/django/django/core/mail/message.pyRp,scCs�|jr�|jptj}|}td|jd|�}|jrR|j|�nxI|jD];}t|t	�r�|j|�q\|j|j
|��q\Wn|S(NRZR'(RhR'RR(RYt
mixed_subtypeRgRR2Rt_create_attachment(RGRsR'tbody_msgt
attachment((s:/tmp/pip-install-XxeQeY/django/django/core/mail/message.pyR�/s		cCsx|jdd�\}}|dkrK|jp3tj}t|||�}n)t||�}|j|�tj|�|S(uT
        Converts the content, mimetype pair into a MIME attachment object.
        u/iutext(	R4R'RR(RORRStEncoderst
encode_base64(RGR}R~tbasetypeRVR'R�((s:/tmp/pip-install-XxeQeY/django/django/core/mail/message.pyt_create_mime_attachment=s

cCs�|dkr9tj|�\}}|dkr9t}q9n|j||�}|r�y|jd�Wn;tk
r�tjr�|jd�}ndd|f}nX|j	ddd|�n|S(uh
        Converts the filename, content, mimetype triple into a MIME attachment
        object.
        uasciiuutf-8uuContent-Dispositionu
attachmentR|N(
Rt	mimetypest
guess_typetDEFAULT_ATTACHMENT_MIME_TYPER�R)R*RRNt
add_header(RGR|R}R~t_R�((s:/tmp/pip-install-XxeQeY/django/django/core/mail/message.pyR�Ls
	
N(RRt__doc__RoR�RR'RPR>RlRwRxRzRR�RpR�R�R�(((s:/tmp/pip-install-XxeQeY/django/django/core/mail/message.pyR^�s 					tEmailMultiAlternativescBsVeZdZdZddddddddddd�
Zd�Zd�Zd�ZRS(u�
    A version of EmailMessage that makes it easy to send multipart/alternative
    messages. For example, including text and HTML versions of the text is
    made easier.
    ualternativeuc
CsAtt|�j|||||||||
�	|	p7g|_dS(u
        Initialize a single email message (which can be sent to multiple
        recipients).

        All strings used to create the message can be unicode strings (or UTF-8
        bytestrings). The SafeMIMEText class will handle any necessary encoding
        conversions.
        N(tsuperR�RPtalternatives(RGRfRgReRaRcRjRhRkR�Rb((s:/tmp/pip-install-XxeQeY/django/django/core/mail/message.pyRPjs.cCs>|dk	st�|dk	s$t�|jj||f�dS(u-Attach an alternative content representation.N(RR_R�R{(RGR}R~((s:/tmp/pip-install-XxeQeY/django/django/core/mail/message.pytattach_alternativexscCs|j|j|��S(N(R�t_create_alternatives(RGRs((s:/tmp/pip-install-XxeQeY/django/django/core/mail/message.pyRp~scCs�|jptj}|jr|}td|jd|�}|jrR|j|�nx*|jD]}|j|j|��q\Wn|S(NRZR'(	R'RR(R�RYtalternative_subtypeRgRR�(RGRsR'R�talternative((s:/tmp/pip-install-XxeQeY/django/django/core/mail/message.pyR��s		N(	RRR�R�RRPR�RpR�(((s:/tmp/pip-install-XxeQeY/django/django/core/mail/message.pyR�bs		((3t
__future__RR�RRR?RtemailRRtCharsetRR�temail.mime.textRtemail.mime.multipartRtemail.mime.baseRtemail.headerRtemail.utilsRR	R
Rtdjango.confRtdjango.core.mail.utilsR
tdjango.utils.encodingRtdjango.utilsRRQRt
body_encodingR�t
ValueErrorRR#tsetR,R1R$R9RORYtobjectR^R�(((s:/tmp/pip-install-XxeQeY/django/django/core/mail/message.pyt<module>sP"			!�

https://t.me/AnonymousX5 - 2025