From dd22961920ed4f288edefcb720a5ee476452a0ec Mon Sep 17 00:00:00 2001 From: Aniket Sarkar Date: Thu, 23 Sep 2021 14:56:16 +0530 Subject: [PATCH 1/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 98856bf..b8b646d 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ html = """ @app.post("/email") -async def simple_send() -> JSONResponse: +async def simple_send(): message = Message( subject="Flask-Mailing module", From e4777b6830e71d5b3b48816618df820da445c740 Mon Sep 17 00:00:00 2001 From: Aniket Sarkar Date: Thu, 30 Dec 2021 08:37:45 +0530 Subject: [PATCH 2/2] some more changes --- examples/base.py | 10 +++++----- examples/main.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/base.py b/examples/base.py index 63829dc..fb3282e 100644 --- a/examples/base.py +++ b/examples/base.py @@ -6,11 +6,11 @@ def create_app(): app = Flask(__name__) - app.config['MAIL_USERNAME'] = os.environ['mu'] - app.config['MAIL_PASSWORD'] = os.environ['mp'] - app.config['MAIL_FROM'] = "aniketsarkar1998@gmail.com" - app.config['MAIL_PORT'] = os.environ['mport'] - app.config['MAIL_SERVER'] = os.environ['ms'] + app.config['MAIL_USERNAME'] = os.environ['MAIL_USERNAME'] + app.config['MAIL_PASSWORD'] = os.environ['MAIL_PASSWORD'] + # app.config['MAIL_FROM'] = "aniketsarkar1998@gmail.com" + app.config['MAIL_PORT'] = os.environ['MAIL_PORT'] + app.config['MAIL_SERVER'] = os.environ['MAIL_HOST'] app.config['MAIL_USE_TLS'] = True app.config['MAIL_USE_SSL'] = False # app.config['MAIL_TEMPLATE_FOLDER'] = Path(__file__).parent / 'attachments' diff --git a/examples/main.py b/examples/main.py index 1b5b4ab..14dc747 100644 --- a/examples/main.py +++ b/examples/main.py @@ -31,7 +31,7 @@ async def simple_send() -> jsonify: recipients=[os.environ['MAIL_RECIPIENT']], body="This is the basic email body", ) - message.add_recipient("aniforsana@gmail.com") + # message.add_recipient("aniforsana@gmail.com") await mail.send_message(message)