summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2021-01-30 16:42:46 +0100
committerAnton Khirnov <anton@khirnov.net>2021-01-30 16:42:46 +0100
commit5c7200b4130108848085ed294d2c956ff0b047d6 (patch)
tree18e34430bdca946a9ce317953dc744dafcfab70d
parent10135f6d1563ccd01c9afc90613f7dd16ca4c541 (diff)
mail/envelope: document Envolope.attach_file()
-rw-r--r--alot/mail/envelope.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/alot/mail/envelope.py b/alot/mail/envelope.py
index db907340..c4ac291b 100644
--- a/alot/mail/envelope.py
+++ b/alot/mail/envelope.py
@@ -208,6 +208,14 @@ class Envelope:
self.modified_since_sent = True
def attach_file(self, path, filename = None):
+ """
+ Attach a file at a given path.
+
+ :param path path to the file to attach
+ :type path str
+ :param filename filename to write into attachment properties
+ :type filename str or None
+ """
with open(path, 'rb') as f:
data = f.read()