Skip to content

Instantly share code, notes, and snippets.

View italovalcy's full-sized avatar

Italo Valcy S Brito italovalcy

  • Florida International University
  • Miami, FL
View GitHub Profile
@italovalcy
italovalcy / smtp_server.py
Created March 20, 2024 12:00 — forked from amirasaran/smtp_server.py
Python3 SMTP (smtpd) Mail Server with authentication sample + smtpd TLS support
import asynchat
import base64
import ssl
import asyncore
from smtpd import SMTPServer as BaseSMTPServer, SMTPChannel as BaseSMTPChannel, DEBUGSTREAM
def decode_b64(data):
"""Wrapper for b64decode, without having to struggle with bytestrings."""