From 5c7200b4130108848085ed294d2c956ff0b047d6 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sat, 30 Jan 2021 16:42:46 +0100 Subject: mail/envelope: document Envolope.attach_file() --- alot/mail/envelope.py | 8 ++++++++ 1 file changed, 8 insertions(+) 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() -- cgit v1.2.3