Your IP : 13.59.58.68


Current Path : /opt/imunify360/venv/lib64/python3.11/site-packages/clcommon/__pycache__/
Upload File :
Current File : //opt/imunify360/venv/lib64/python3.11/site-packages/clcommon/__pycache__/clemail.cpython-311.pyc

�

\�Dg���4�ddlZddlZdZGd�d��ZdS)�NzSubject:c�0�eZdZdZd�Zedd���ZdS)�ClEmailz-
    class for generation email messages
    c��dS�N�)�selfs �p/builddir/build/BUILD/imunify360-venv-2.4.0/opt/imunify360/venv/lib/python3.11/site-packages/clcommon/clemail.py�__init__zClEmail.__init__s����Nc��tjtj�|����}tj|���}|�tj�|�����|���	d��}t|��dkr�|d�t��ri|ddkr]|d�
td�����}|�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��)�jinja2�FileSystemLoader�os�path�dirname�Environment�get_template�basename�render�split�len�
startswith�SUBJECT_LINE_PREFIX�replace�strip�pop�join)�
template_path�
templ_data�subject�templ_loader�templ_envir�
message_liness      r	�generate_mail_jinja2zClEmail.generate_mail_jinja2s#���.�r�w���}�/M�/M�N�N���(��=�=�=��#�0�0��G���]�+�+�
�
�
�&��
�
�
�%��+�+�		��}����!�!�m�A�&6�&A�&A�BU�&V�&V�!�[h�ij�[k�oq�[q�[q�#�A�&�.�.�/B�B�G�G�M�M�O�O�G����a� � � ����a� � � ���	�	�-�0�0�0�0rr)�__name__�
__module__�__qualname__�__doc__r
�staticmethodr)rrr	rrsM��������
�
�
��1�1�1��\�1�1�1rr)rrrrrrr	�<module>r/sS��
�	�	�	�
�
�
�
�!��
 1� 1� 1� 1� 1� 1� 1� 1� 1� 1r

?>