|
Server : Apache System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64 User : njnconst ( 1116) PHP Version : 8.4.18 Disable Function : NONE Directory : /lib64/python2.7/site-packages/django/core/mail/ |
Upload File : |
�
r�\c @ s� d Z d d l m Z d d l m Z d d l m Z d d l m Z m Z d d l
m Z m Z m
Z
m Z m Z m Z m Z m Z d e d � Z e d d d d � Z e d d d d � Z e d d d
� Z e d d d � Z d S(
u
Tools for sending email.
i����( t unicode_literals( t settings( t import_by_path( t
CachedDnsNamet DNS_NAME( t EmailMessaget EmailMultiAlternativest SafeMIMETextt SafeMIMEMultipartt DEFAULT_ATTACHMENT_MIME_TYPEt
make_msgidt BadHeaderErrort forbid_multi_line_headersc K s% t | p t j � } | d | | � S( u� Load an email backend and return an instance of it.
If backend is None (default) settings.EMAIL_BACKEND is used.
Both fail_silently and other keyword arguments are used in the
constructor of the backend.
t
fail_silently( R R t
EMAIL_BACKEND( t backendR
t kwdst klass( ( s; /tmp/pip-install-XxeQeY/django/django/core/mail/__init__.pyt get_connection s c C s@ | p t d | d | d | � } t | | | | d | �j � S( u�
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 auth_user is None, the EMAIL_HOST_USER setting is used.
If auth_password is None, the EMAIL_HOST_PASSWORD setting is used.
Note: The API for this method is frozen. New code wanting to extend the
functionality should use the EmailMessage class directly.
t usernamet passwordR
t
connection( R R t send( t subjectt messaget
from_emailt recipient_listR
t auth_usert
auth_passwordR ( ( s; /tmp/pip-install-XxeQeY/django/django/core/mail/__init__.pyt send_mail! s
c
C sh | p t d | d | d | � } g | D]- \ } } } } t | | | | d | �^ q( } | j | � S( u9
Given a datatuple of (subject, message, from_email, recipient_list), sends
each message to each recipient list. Returns the number of emails sent.
If from_email is None, the DEFAULT_FROM_EMAIL setting is used.
If auth_user and auth_password are set, they're used to log in.
If auth_user is None, the EMAIL_HOST_USER setting is used.
If auth_password is None, the EMAIL_HOST_PASSWORD setting is used.
Note: The API for this method is frozen. New code wanting to extend the
functionality should use the EmailMessage class directly.
R R R
R ( R R t
send_messages(
t datatupleR
R R R R R t sendert recipientt messages( ( s; /tmp/pip-install-XxeQeY/django/django/core/mail/__init__.pyt send_mass_mail5 s 7c C s t j s
d St d t j | f | t j g t j D] } | d ^ q3 d | �} | rk | j | d � n | j d | � d S( u@ Sends a message to the admins, as defined by the ADMINS setting.Nu %s%si R u text/htmlR
( R t ADMINSR t EMAIL_SUBJECT_PREFIXt SERVER_EMAILt attach_alternativeR ( R R R
R t html_messaget at mail( ( s; /tmp/pip-install-XxeQeY/django/django/core/mail/__init__.pyt mail_adminsL s ) c C s t j s
d St d t j | f | t j g t j D] } | d ^ q3 d | �} | rk | j | d � n | j d | � d S( uD Sends a message to the managers, as defined by the MANAGERS setting.Nu %s%si R u text/htmlR
( R t MANAGERSR R% R&