a
    Ê[Ùf“  ã                   @   s   d Z G dd„ dƒZdS )zBase email backend class.c                   @   sB   e Zd ZdZddd„Zdd„ Zdd„ Zd	d
„ Zdd„ Zdd„ Z	dS )Ú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
    Fc                 K   s
   || _ d S ©N)Úfail_silently)Úselfr   Úkwargs© r   úpC:\Users\91910\OneDrive\Desktop\vts_admin_rebuild-master\vts\Lib\site-packages\django/core/mail/backends/base.pyÚ__init__   s    zBaseEmailBackend.__init__c                 C   s   dS )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.
        Nr   ©r   r   r   r   Úopen   s    zBaseEmailBackend.openc                 C   s   dS )zClose a network connection.Nr   r	   r   r   r   Úclose(   s    zBaseEmailBackend.closec                 C   s.   z|   ¡  W n ty(   |  ¡  ‚ Y n0 | S r   )r
   Ú	Exceptionr   r	   r   r   r   Ú	__enter__,   s    zBaseEmailBackend.__enter__c                 C   s   |   ¡  d S r   )r   )r   Úexc_typeÚ	exc_valueÚ	tracebackr   r   r   Ú__exit__4   s    zBaseEmailBackend.__exit__c                 C   s   t dƒ‚dS )zm
        Send one or more EmailMessage objects and return the number of email
        messages sent.
        zCsubclasses of BaseEmailBackend must override send_messages() methodN)ÚNotImplementedError)r   Zemail_messagesr   r   r   Úsend_messages7   s    ÿzBaseEmailBackend.send_messagesN)F)
Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r
   r   r   r   r   r   r   r   r   r      s   
r   N)r   r   r   r   r   r   Ú<module>   s   