1
0
Fork 0

Improve documentation

This commit is contained in:
Pascal F 2024-05-24 07:36:53 +02:00
parent bb924f1f4d
commit 7337d3130e
No known key found for this signature in database
GPG key ID: 3C576B538F890866
2 changed files with 23 additions and 15 deletions

View file

@ -654,9 +654,16 @@ class Message(models.Model):
to retrieve that information through normal channels, so we must
pre-set it.
For conveninence, you can use django.core.mail.EmailMessage to build a Message instance::
from django.core.mail import EmailMessage
message.reply(
EmailMessage(subject="pong", body="pongpong")
)
"""
if not isinstance(message, EmailMessage):
raise ValueError('Message must be an instance of EmailMessage')
raise ValueError('Message must be an instance of email.Message')
if not message.from_email:
if self.mailbox.from_email:

View file

@ -7,20 +7,20 @@ POP3 and IMAP as well as local file-based mailboxes.
.. table:: 'Protocol' Options
============ ================ ====================================================================================================================================================================
Mailbox Type 'Protocol':// Notes
============ ================ ====================================================================================================================================================================
POP3 ``pop3://`` Can also specify SSL with ``pop3+ssl://``
IMAP ``imap://`` Can also specify SSL with ``imap+ssl://`` or STARTTLS with ``imap+tls``; additional configuration is also possible: see :ref:`pop3-and-imap-mailboxes` for details.
Gmail IMAP ``gmail+ssl://`` Uses OAuth authentication for Gmail's IMAP transport. See :ref:`gmail-oauth` for details.
Office365 API``office365://`` Uses OAuth authentication for Office365 API transport. See :ref:`office365-oauth` for details.
Maildir ``maildir://``
Mbox ``mbox://``
Babyl ``babyl://``
MH ``mh://``
MMDF ``mmdf://``
Piped Mail *empty* See :ref:`receiving-mail-from-exim4-or-postfix`
============ ================ ====================================================================================================================================================================
================ ================ ====================================================================================================================================================================
Mailbox Type 'Protocol':// Notes
================ ================ ====================================================================================================================================================================
POP3 ``pop3://`` Can also specify SSL with ``pop3+ssl://``
IMAP ``imap://`` Can also specify SSL with ``imap+ssl://`` or STARTTLS with ``imap+tls``; additional configuration is also possible: see :ref:`pop3-and-imap-mailboxes` for details.
Gmail IMAP ``gmail+ssl://`` Uses OAuth authentication for Gmail's IMAP transport. See :ref:`gmail-oauth` for details.
Office365 API ``office365://`` Uses OAuth authentication for Office365 API transport. See :ref:`office365-oauth` for details.
Maildir ``maildir://`` *empty*
Mbox ``mbox://`` *empty*
Babyl ``babyl://`` *empty*
MH ``mh://`` *empty*
MMDF ``mmdf://`` *empty*
Piped Mail *empty* See :ref:`receiving-mail-from-exim4-or-postfix`
================ ================ ====================================================================================================================================================================
.. warning::
@ -117,6 +117,7 @@ Build your URI accordingly::
.. _office365-oauth:
Office 365 API
-------------------------------------