From 202c80c665d69e2b136de194708b326d8aef5663 Mon Sep 17 00:00:00 2001 From: retoor Date: Wed, 4 Dec 2024 20:27:22 +0000 Subject: [PATCH] docs: add SMTP class skeleton with env import and login state in Python IMAP doc --- python_imap_usage.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/python_imap_usage.md b/python_imap_usage.md index 8bb3858..01f5de0 100644 --- a/python_imap_usage.md +++ b/python_imap_usage.md @@ -68,6 +68,16 @@ except Exception as e: ## Sending email (requires my AsyncioPath made in other gist): ``` +from env import secret +import asyncio + +import smtplib +from email.mime.text import MIMEText +from email.mime.multipart import MIMEMultipart +server = None + +logged_in = False + class SMTP(AsyncioPatch): def __init__(self, smtp_server, port, sender_email, password):