|
Server : Apache/2.4.41 (Ubuntu) System : Linux vmi1525618.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64 User : www-data ( 33) PHP Version : 8.2.12 Disable Function : NONE Directory : /lib/python3/dist-packages/certbot/__pycache__/ |
Upload File : |
U
�]( � @ s0 d Z ddlZddlZddlZddlZdd� ZdS )z2Send e-mail notification to system administrators.� Nc C s� t �|�}|�dd� |�d|� |�d| � |�� }z$t�� }|�� |�d|g|� W nd tjtj tj
tjtj
fk
r� z"tjddgtjd�}|�|� W n tk
r� Y Y d S X Y nX d
S )z�Send email notification.
Try to notify the addressee (``whom``) by e-mail, with Subject:
defined by ``subject`` and message body by ``what``.
ZFromzCertbot renewal agent <root>ZToZSubject�rootz/usr/sbin/sendmailz-t)�stdinFT)�emailZmessage_from_stringZ
add_headerZ as_string�smtplibZLMTPZconnectZsendmailZ
SMTPHeloErrorZSMTPRecipientsRefusedZSMTPSenderRefusedZ
SMTPDataError�socket�error�
subprocess�Popen�PIPEZcommunicate�OSError)ZsubjectZwhomZwhat�msgZlmtp�proc� r �0/usr/lib/python3/dist-packages/certbot/notify.py�notify s,
�
�r )�__doc__r r r r r r r r r �<module> s