î
ªÍ X%  ã               @   s    d  Z  Gd d „  d e ƒ Z d S)zBase email backend class.c               @   sa   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)ÚBaseEmailBackenda1  
    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   úL/home/ubuntu/projects/ifolica/build/django/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   |  j  ƒ  |  S)N)r   )r   r   r   r   Ú	__enter__*   s    
zBaseEmailBackend.__enter__c             C   s   |  j  ƒ  d  S)N)r	   )r   Úexc_typeÚ	exc_valueÚ	tracebackr   r   r   Ú__exit__.   s    zBaseEmailBackend.__exit__c             C   s   t  d ƒ ‚ d S)zo
        Sends one or more EmailMessage objects and returns the number of email
        messages sent.
        zCsubclasses of BaseEmailBackend must override send_messages() methodN)ÚNotImplementedError)r   Zemail_messagesr   r   r   Úsend_messages1   s    zBaseEmailBackend.send_messagesN)
Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r	   r
   r   r   r   r   r   r   r      s   r   N)r   Úobjectr   r   r   r   r   Ú<module>   s   