-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This pull request sends email in better HTLM style.
Just one row is not so readable. Let's show in TableView better way. Signed-off-by: Petr "Stone" Hracek <[email protected]>
- Loading branch information
Showing
2 changed files
with
18 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,7 +39,9 @@ def send_email(self, subject_msg, body: List[str]): | |
send_from = "[email protected]" | ||
send_to = self.recipient_email | ||
print(body) | ||
msg = "<br>".join(body) | ||
whole_body = "".join(body) | ||
msg = ("<html><head><style>table, th, td {border: 1px solid black;}</style></head>" | ||
f"<body>{whole_body}</body></html>") | ||
print(msg) | ||
self.mime_msg["From"] = send_from | ||
self.mime_msg["To"] = ", ".join(send_to) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters