diff --git a/emailtunnel/mailhole.py b/emailtunnel/mailhole.py index 88b264b..3de5bb9 100644 --- a/emailtunnel/mailhole.py +++ b/emailtunnel/mailhole.py @@ -21,7 +21,7 @@ def should_mailhole(self, message, recipient, sender): def deliver_mailhole(self, message, recipients, sender, mailhole_key): with requests.Session() as session: message_bytes = re.sub(br'(\r\n|\n|\r)', b'\r\n', - message.as_bytes()) + message.as_binary()) for rcpt in recipients: data = dict( key=mailhole_key, @@ -62,7 +62,7 @@ def deliver(self, message, recipients, sender): if not requests: print("You must `pip install requests`!") if ordinary_rcpts: - super().deliver(message, ordinary_rcpts, sender) + super(MailholeRelayMixin, self).deliver(message, ordinary_rcpts, sender) assert re.match(MailholeRelayMixin.mailhole_pattern, 'test@hotmail.com')