HEX
Server: Apache
System: Linux insrv.serversdaddy.com 5.14.0-362.24.2.el9_3.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Mar 30 14:11:54 EDT 2024 x86_64
User: jsaha (1066)
PHP: 8.3.6
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/alt/python37/lib/python3.7/site-packages/clcommon/__pycache__/clemail.cpython-37.pyc
B


+�L�jzg�@sJddlmZddlmZddlmZddlZddlZdZGdd�d�ZdS)�)�absolute_import)�division)�print_functionNzSubject:c@s&eZdZdZdd�Zeddd��ZdS)�ClEmailz-
    class for generation email messages
    cCsdS)N�)�selfrr��/builddir/build/BUILDROOT/alt-python27-cllib-3.4.1-1.el9.cloudlinux.x86_64/opt/alt/python37/lib/python3.7/site-packages/clcommon/clemail.py�__init__szClEmail.__init__NcCs�t�tj�|��}tj|d�}|�tj�|���|��	d�}t
|�dkr�|d�t�r�|ddkr�|d�
td���}|�d�|�d�|d�|�fS)a8
        Generates email message using jinja2 template engine
        :param template_path: path to jinja2 template
        :param templ_data: Data to fill template using jinja2
        :param subject: Email subject to use if it not found in template
        :return: Cortege (email_subject, email_body)
        )�loader�
�r��)�jinja2ZFileSystemLoader�os�path�dirnameZEnvironmentZget_template�basenameZrender�split�len�
startswith�SUBJECT_LINE_PREFIX�replace�strip�pop�join)Z
template_pathZ
templ_dataZsubjectZtempl_loaderZtempl_envirZ
message_linesrrr�generate_mail_jinja2s
&

zClEmail.generate_mail_jinja2)N)�__name__�
__module__�__qualname__�__doc__r	�staticmethodrrrrrrsr)Z
__future__rrrrrrrrrrr�<module>s