Source code django/core/mail/backends/dummy.py

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
"""
Dummy email backend that does nothing.
"""

from django.core.mail.backends.base import BaseEmailBackend


class EmailBackend(BaseEmailBackend):
    def send_messages(self, email_messages):
        return len(list(email_messages))