diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2010-01-04 12:05:04 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2010-01-04 12:05:04 +0000 |
| commit | e07560a88e2bc1f5be2aabec25eca950259f7266 (patch) | |
| tree | 993698b699611434f8503d3fd4aea27fa645c5c1 /docs | |
| parent | 89ded975fe1ff75b5b2456f4ee7e1256a261108e (diff) | |
Modified the way EMAIL_BACKEND is specified to make it consistent with the new "use the class name" policy for backends.
This is a BACKWARDS-INCOMPATIBLE CHANGE for anyone using a manually
specified EMAIL_BACKEND setting. If you have manually specified
EMAIL_BACKEND, you will need to append ".EmailBackend" to your
existing EMAIL_BACKEND setting. See the django-dev mailing list for
details.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12084 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/releases/1.2.txt | 4 | ||||
| -rw-r--r-- | docs/topics/email.txt | 14 |
2 files changed, 9 insertions, 9 deletions
diff --git a/docs/releases/1.2.txt b/docs/releases/1.2.txt index a549bd0cce..d66b79f9c5 100644 --- a/docs/releases/1.2.txt +++ b/docs/releases/1.2.txt @@ -286,7 +286,7 @@ connection with which to send e-mail, you can explicitly request an SMTP connection:: from django.core.mail import get_connection - connection = get_connection('django.core.mail.backends.smtp') + connection = get_connection('django.core.mail.backends.smtp.EmailBackend') messages = get_notification_email() connection.send_messages(messages) @@ -294,7 +294,7 @@ If your call to construct an instance of ``SMTPConnection`` required additional arguments, those arguments can be passed to the :meth:`~django.core.mail.get_connection()` call:: - connection = get_connection('django.core.mail.backends.smtp', hostname='localhost', port=1234) + connection = get_connection('django.core.mail.backends.smtp.EmailBackend', hostname='localhost', port=1234) User Messages API ----------------- diff --git a/docs/topics/email.txt b/docs/topics/email.txt index eee77cb4a0..b23b5d328f 100644 --- a/docs/topics/email.txt +++ b/docs/topics/email.txt @@ -408,7 +408,7 @@ settings file. The SMTP backend is the default configuration inherited by Django. If you want to specify it explicitly, put the following in your settings:: - EMAIL_BACKEND = 'django.core.mail.backends.smtp' + EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' .. admonition:: SMTPConnection objects @@ -433,7 +433,7 @@ providing the ``stream`` keyword argument when constructing the connection. To specify this backend, put the following in your settings:: - EMAIL_BACKEND = 'django.core.mail.backends.console' + EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' This backend is not intended for use in production -- it is provided as a convenience that can be used during development. @@ -451,7 +451,7 @@ the ``file_path`` keyword when creating a connection with To specify this backend, put the following in your settings:: - EMAIL_BACKEND = 'django.core.mail.backends.filebased' + EMAIL_BACKEND = 'django.core.mail.backends.filebased.EmailBackend' EMAIL_FILE_PATH = '/tmp/app-messages' # change this to a proper location This backend is not intended for use in production -- it is provided as a @@ -470,7 +470,7 @@ be send. To specify this backend, put the following in your settings:: - EMAIL_BACKEND = 'django.core.mail.backends.locmem' + EMAIL_BACKEND = 'django.core.mail.backends.locmem.EmailBackend' This backend is not intended for use in production -- it is provided as a convenience that can be used during development and testing. @@ -483,7 +483,7 @@ Dummy backend As the name suggests the dummy backend does nothing with your messages. To specify this backend, put the following in your settings:: - EMAIL_BACKEND = 'django.core.mail.backends.dummy' + EMAIL_BACKEND = 'django.core.mail.backends.dummy.EmailBackend' This backend is not intended for use in production -- it is provided as a convenience that can be used during development. @@ -495,7 +495,7 @@ Defining a custom e-mail backend If you need to change how e-mails are send you can write your own e-mail backend. The ``EMAIL_BACKEND`` setting in your settings file is then the -Python import path for your backend. +Python import path for your backend class. Custom e-mail backends should subclass ``BaseEmailBackend`` that is located in the ``django.core.mail.backends.base`` module. A custom e-mail backend must @@ -503,7 +503,7 @@ implement the ``send_messages(email_messages)`` method. This method receives a list of :class:`~django.core.mail.EmailMessage` instances and returns the number of successfully delivered messages. If your backend has any concept of a persistent session or connection, you should also implement the ``open()`` -and ``close()`` methods. Refer to ``SMTPEmailBackend`` for a reference +and ``close()`` methods. Refer to ``smtp.EmailBackend`` for a reference implementation. .. _topics-sending-multiple-emails: |
