Skip to content

Instantly share code, notes, and snippets.

Tirpitz93 / smtp_w_attachment
Last active Jun 12, 2018 — forked from lavinj87/gist:238ccb229ac594a50b0a
SMTPHandler with support to attachments
View smtp_w_attachment
from email.mime.text import MIMEText
from email.mime.image import MIMEImage
from email.mime.multipart import MIMEMultipart
# from email.Utils import formatdate
from logging.handlers import SMTPHandler
import logging
import os.path
import smtplib
from email.utils import formatdate
You can’t perform that action at this time.