← Back
Editing: __init__.cpython-311.pyc
� �|�e � � � d Z ddlmZ ddlmZmZmZmZmZm Z m Z mZ ddlm Z mZ ddlmZ g d�Zdd �Z dd �Z dd�Z dd�Z dd �ZdS )z Tools for sending email. � )�settings)�DEFAULT_ATTACHMENT_MIME_TYPE�BadHeaderError�EmailMessage�EmailMultiAlternatives�SafeMIMEMultipart�SafeMIMEText�forbid_multi_line_headers� make_msgid)�DNS_NAME� CachedDnsName)� import_string)r r r r r r r r r r �get_connection� send_mail�send_mass_mail�mail_admins� mail_managersNFc �L � t | pt j � � } |dd|i|��S )z�Load an email backend and return an instance of it. If backend is None (default), use settings.EMAIL_BACKEND. Both fail_silently and other keyword arguments are used in the constructor of the backend. � fail_silently� )r r � EMAIL_BACKEND)�backendr �kwds�klasss �;/usr/lib/python3/dist-packages/django/core/mail/__init__.pyr r s4 � � �'�;�X�%;�<�<�E��5�5�5�}�5��5�5�5� c � � |pt |||�� � }t | ||||�� � } |r| � |d� � | � � � S )a� Easy wrapper for sending a single message to a recipient list. All members of the recipient list will see the other recipients in the 'To' field. If from_email is None, use the DEFAULT_FROM_EMAIL setting. If auth_user is None, use the EMAIL_HOST_USER setting. If auth_password is None, use the EMAIL_HOST_PASSWORD setting. Note: The API for this method is frozen. New code wanting to extend the functionality should use the EmailMessage class directly. ��username�passwordr �� connection� text/html)r r �attach_alternative�send) �subject�message� from_email�recipient_listr � auth_user� auth_passwordr"