From 1f9d6c0e987a0a98b7c6e532bb582244cd90d7dd Mon Sep 17 00:00:00 2001 From: Son NK Date: Wed, 18 Dec 2019 18:06:51 +0200 Subject: [PATCH] remove poc_send_email --- poc/poc_send_email.py | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 poc/poc_send_email.py diff --git a/poc/poc_send_email.py b/poc/poc_send_email.py deleted file mode 100644 index c5305680..00000000 --- a/poc/poc_send_email.py +++ /dev/null @@ -1,33 +0,0 @@ -"""POC on how to send email through postfix directly -TODO: need to improve email score before using this -""" - -import smtplib -from email.mime.multipart import MIMEMultipart -from email.mime.text import MIMEText - -fromaddr = "hello@u.sl.meo.ovh" -toaddr = "test-7hxfo@mail-tester.com" - -# alternative is necessary so email client will display html version first, then use plain one as fall-back -msg = MIMEMultipart("alternative") - -msg["From"] = fromaddr -msg["To"] = toaddr -msg["Subject"] = "test subject 2" - -msg.attach(MIMEText("test plain body", "plain")) -msg.attach( - MIMEText( - """ - - -Test body - -""", - "html", - ) -) - -with smtplib.SMTP(host="localhost") as server: - server.sendmail(fromaddr, toaddr, msg.as_string())