Prechádzať zdrojové kódy

Merge pull request #22 from Miksus/docs/send_alias

DOCS: add address aliases
Mikael Koli 4 rokov pred
rodič
commit
30c73d2a40
1 zmenil súbory, kde vykonal 20 pridanie a 1 odobranie
  1. 20 1
      docs/tutorials/sending.rst

+ 20 - 1
docs/tutorials/sending.rst

@@ -97,4 +97,23 @@ to your emails:
         receivers=['you@example.com'],
         cc=['also@example.com'],
         bcc=['outsider@example.com']
-    )
+    )
+
+.. _send-alias:
+
+Sending Email with Alias
+------------------------
+
+You can also alias the sender and receivers:
+
+.. code-block:: python
+
+    email.send(
+        subject='email subject',
+        sender="The Sender <me@example.com>",
+        receivers=['The Receiver <you@example.com>']
+    )
+
+Alias is an alternative text that is displayed instead of 
+the actual email addresses. The receivers can still get 
+the addresses though.