django-forwardemail Documentation =================================== Django integration for ForwardEmail API with multi-site support. .. toctree:: :maxdepth: 2 :caption: Contents: installation configuration usage api Overview -------- django-forwardemail is a Django package that provides seamless integration with the ForwardEmail service. It offers: * **Multi-Site Support**: Full Django Sites framework integration * **Enhanced Site Detection**: Automatic fallback mechanisms for missing request/site parameters * **Backward Compatibility**: Maintained EmailService alias for seamless integration * **Professional Logging**: Comprehensive logging instead of debug prints * **ForwardEmail API**: Complete integration with ForwardEmail service Quick Start ----------- Install the package: .. code-block:: bash pip install django-forwardemail Add to your Django settings: .. code-block:: python INSTALLED_APPS = [ # ... other apps 'django.contrib.sites', # Required for multi-site support 'django_forwardemail', ] Run migrations and create an ``EmailConfiguration`` for your site (see :doc:`installation` and :doc:`configuration`). Then send email with the service class: .. code-block:: python from django_forwardemail.services import ForwardEmailService ForwardEmailService.send_email( to='user@example.com', subject='Welcome!', text='Welcome to our service!', html='

Welcome to our service!

', ) ``EmailService`` is a backward-compatible alias for ``ForwardEmailService``. Requirements ------------ * Django 4.2+ (tested through Django 6.0) * Python 3.10+ * requests 2.25.0+ * ForwardEmail account and API key Documentation Sections ---------------------- * :doc:`installation` - Installation and setup guide * :doc:`configuration` - Configuration options and multi-site setup * :doc:`usage` - Usage examples and best practices * :doc:`api` - Complete API reference Links ----- * **PyPI**: https://pypi.org/project/django-forwardemail/ * **GitHub**: https://github.com/Pacficient-Labs/django-forwardemail * **Issues**: https://github.com/Pacficient-Labs/django-forwardemail/issues Indices and tables ================== * :ref:`genindex` * :ref:`modindex` * :ref:`search`