summaryrefslogtreecommitdiff
path: root/alot/mail/envelope.py
diff options
context:
space:
mode:
Diffstat (limited to 'alot/mail/envelope.py')
-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()