Fix headers method to handle single recipient as a string
This commit is contained in:
parent
65e449494d
commit
84fdb3d499
1 changed files with 2 additions and 0 deletions
|
@ -172,6 +172,8 @@ class MicromailClient:
|
|||
self.write(f"Subject: {headers['subject']}\r\n".encode())
|
||||
|
||||
to = headers.get("to", self.to)
|
||||
if isinstance(to, str):
|
||||
to = [to]
|
||||
self.write(f"To: {', '.join(to)}\r\n".encode())
|
||||
|
||||
def write_message(self, content):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue