Skip to main content

A fake SMTP server

Project description

Fakemail is a simple SMTP server that runs as a command line script, relaying incoming messages to an upstream server, to an HTTP endpoint or to stdout.

Fakemail is useful for testing emails during development: it can rewrite the envelope-to address on all messages to a single address, ensuring messages cannot be sent to real users.

Fakemail is useful for processing inbound messages in a web application, by acting as an SMTP-to-HTTP proxy.

Caution: Fakemail always runs as an open relay. Ensure you do not expose fakemail on a public address.


pip install -r requirements.txt


To see an up to date list of command line options, run:

python --help


Redirect emails for development:

python –bind –relay –

View emails on stdout:

python --bind --stdout

Feed emails into an HTTP endpoint (SMTP-to-HTTP):

python --bind --relay-url=""

python --bind --relay-url=""

Multiple relays are possible: you can relay via SMTP, to an HTTP endpoint, and log to stdout in a single process. If any one relay fails the mail will be rejected, even if other relays succeed.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for fakemail, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size fakemail-0.1.0-py3-none-any.whl (6.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size fakemail-0.1.0.tar.gz (8.4 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page