Просмотр исходного кода

Merge pull request #22 from Miksus/docs/send_alias

DOCS: add address aliases
Mikael Koli 4 лет назад
Родитель
Сommit
30c73d2a40
1 измененных файлов с 20 добавлено и 1 удалено
  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.