From 6d080ca45dd0c7f31c7437fa11cae78e2c660e9f Mon Sep 17 00:00:00 2001 From: norman-andrians Date: Thu, 7 Sep 2023 23:00:02 +0700 Subject: [PATCH] send edited image to email --- main.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index c47dc53..4381ac8 100644 --- a/main.py +++ b/main.py @@ -32,7 +32,7 @@ def send_email(): # message variable subject = "confirm your account" - msg = "your OTP code is" + msg = "Here's your email confirmation" zmail = MIMEMultipart() zmail['From'] = mail_sender @@ -43,7 +43,8 @@ def send_email(): zmail.attach(MIMEText(msg, 'plain')) # attach picure - pict = open('images/main/black-suit.png', 'rb').read(); + add_textimg("Your otp code is " + str(randis)) + pict = open("images/output/pos.png", "rb").read() zmail.attach(MIMEImage(pict, name="black man suit")) # creating context @@ -56,4 +57,4 @@ def send_email(): print("Failed to send a email") print(str(e)) -add_textimg("Your otp code is 3826") \ No newline at end of file +send_email() \ No newline at end of file