Sfoglia il codice sorgente

docs: add about Message-ID

Mikael Koli 3 anni fa
parent
commit
e90e921c61
3 ha cambiato i file con 13 aggiunte e 0 eliminazioni
  1. 6 0
      docs/tutorials/config.rst
  2. 3 0
      docs/tutorials/testing.rst
  3. 4 0
      docs/versions.rst

+ 6 - 0
docs/tutorials/config.rst

@@ -76,6 +76,12 @@ server pre-configured:
         text="Hi, this is an email."
         text="Hi, this is an email."
     )
     )
 
 
+.. note::
+
+    Gmail requires emails sent via its API 
+    to be `RFC 2822 <https://www.rfc-editor.org/rfc/rfc2822>`_
+    compliant. Messages without ``Message-ID`` headers may
+    fail as of 2022. Red Mail always generates a unique message ID.
 
 
 .. _config-outlook:
 .. _config-outlook:
 
 

+ 3 - 0
docs/tutorials/testing.rst

@@ -43,6 +43,7 @@ in tests:
     assert str(msg) == """from: me@example.com
     assert str(msg) == """from: me@example.com
     subject: Some news
     subject: Some news
     to: you@example.com
     to: you@example.com
+    Message-ID: <167294165062.31860.1664530310632362057@example.com>
     Content-Type: text/plain; charset="utf-8"
     Content-Type: text/plain; charset="utf-8"
     Content-Transfer-Encoding: 7bit
     Content-Transfer-Encoding: 7bit
     MIME-Version: 1.0
     MIME-Version: 1.0
@@ -111,6 +112,7 @@ Then to use this mock:
     assert msgs == ["""from: me@example.com
     assert msgs == ["""from: me@example.com
     subject: Some news
     subject: Some news
     to: you@example.com
     to: you@example.com
+    Message-ID: <167294165062.31860.1664530310632362057@example.com>
     Content-Type: text/plain; charset="utf-8"
     Content-Type: text/plain; charset="utf-8"
     Content-Transfer-Encoding: 7bit
     Content-Transfer-Encoding: 7bit
     MIME-Version: 1.0
     MIME-Version: 1.0
@@ -158,6 +160,7 @@ Then to use this class:
     assert msgs == ["""from: me@example.com
     assert msgs == ["""from: me@example.com
     subject: Some news
     subject: Some news
     to: you@example.com
     to: you@example.com
+    Message-ID: <167294165062.31860.1664530310632362057@example.com>
     Content-Type: text/plain; charset="utf-8"
     Content-Type: text/plain; charset="utf-8"
     Content-Transfer-Encoding: 7bit
     Content-Transfer-Encoding: 7bit
     MIME-Version: 1.0
     MIME-Version: 1.0

+ 4 - 0
docs/versions.rst

@@ -4,6 +4,10 @@
 Version history
 Version history
 ===============
 ===============
 
 
+- ``0.5.0``
+
+    - Add: Now ``Message-ID`` header is always generated. Sending emails via Gmail may fail without it as of 2022. 
+
 - ``0.4.2``
 - ``0.4.2``
 
 
     - Docs: Changed docs style.
     - Docs: Changed docs style.