Python email service for sending templated emails via SMTP.
# Source: https://github.com/mikeckennedy/python-for-entrepreneurs-course-demos | License: MIT | Copyright 2016 Michael Kennedy
# Provided via justclaw.it.com; keep this notice with the code.
import mailer
import html2text
from blue_yellow_app.email.template_paser import EmailTemplateParser
class EmailService:
__smtp_username = None
__smtp_password = None
__smtp_server = None
__smtp_port = None
__is_debug_mode = False
__from_address = 'Talk Python Demo <demo@talkpython.fm>'
@staticmethod
def global_init(username, password, server, port, is_debug):
EmailService.__is_debug_mode = is_debug
EmailService.__smtp_username = username
EmailService.__smtp_password = password
EmailService.__smtp_port = int(port)
EmailService.
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key