
    Vh                         d Z  G d d      Zy)zBase email backend class.c                   6    e Zd ZdZd	dZd Zd Zd Zd Zd Z	y)
BaseEmailBackenda3  
    Base class for email backend implementations.

    Subclasses must at least overwrite send_messages().

    open() and close() can be called indirectly by using a backend object as a
    context manager:

       with backend as connection:
           # do something with connection
           pass
    c                     || _         y N)fail_silently)selfr   kwargss      N/home/dcms/DCMS/lib/python3.12/site-packages/django/core/mail/backends/base.py__init__zBaseEmailBackend.__init__   s
    *    c                      y)a+  
        Open a network connection.

        This method can be overwritten by backend implementations to
        open a network connection.

        It's up to the backend implementation to track the status of
        a network connection if it's needed by the backend.

        This method can be called by applications to force a single
        network connection to be used when sending mails. See the
        send_messages() method of the SMTP backend for a reference
        implementation.

        The default implementation does nothing.
        N r   s    r	   openzBaseEmailBackend.open   s    " 	r   c                      y)zClose a network connection.Nr   r   s    r	   closezBaseEmailBackend.close(   s    r   c                 d    	 | j                          | S # t        $ r | j                           w xY wr   )r   	Exceptionr   r   s    r	   	__enter__zBaseEmailBackend.__enter__,   s4    	IIK   	JJL	s    /c                 $    | j                          y r   )r   )r   exc_type	exc_value	tracebacks       r	   __exit__zBaseEmailBackend.__exit__4   s    

r   c                     t        d      )zm
        Send one or more EmailMessage objects and return the number of email
        messages sent.
        zCsubclasses of BaseEmailBackend must override send_messages() method)NotImplementedError)r   email_messagess     r	   send_messageszBaseEmailBackend.send_messages7   s    
 "Q
 	
r   N)F)
__name__
__module____qualname____doc__r
   r   r   r   r   r   r   r   r	   r   r      s%    +&
r   r   N)r!   r   r   r   r	   <module>r"      s    :
 :
r   