Skip to main content

Pure-python library to capture emails into a dropbox

Project description

Readme File for smtpdropbox

Smtpdropbox is a subclass of the smtpd module. It allows a user to set up an smtp daemon on a random port and send emails to it. When the daemon receives an email, it parses it and saves the parsed data structure to a file on the filesystem. This file is saved in JSON format (using the standard JSON library of Python) to help users easily recreate / use the data from the email.

Common uses for this module are for testing software that sends automated emails. If that software points to this smtp server, the emails can be trapped and parsed automatically, verifying that the email was sent and what is in the email.

FUTURE WORK

This library does not save file attachments (yet). An enhancement would be to make it save any/all attachments as individual files, hopefully named the same as they were in the email.

Also, future work includes adding the ability to save the mail message received as a plain text file as well as a json file. it currently does not do so, though it hasn’t been done yet.

PARAMETERS

When instantiating this class, you specify the boxname (really, this is localhost or 127.0.0.1) and port number to listen on, the boxname to forward messages to (as yet unimplemented), the names of the textfile and json file, and the number of messages to process before exiting (0=infinite).

The test has a complete example of usage.

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

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

Source Distributions

smtpdropbox-1.0.zip (8.6 kB view details)

Uploaded Source

smtpdropbox-1.0.tar.gz (6.4 kB view details)

Uploaded Source

smtpdropbox-1.0.tar.bz2 (6.6 kB view details)

Uploaded Source

File details

Details for the file smtpdropbox-1.0.zip.

File metadata

  • Download URL: smtpdropbox-1.0.zip
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for smtpdropbox-1.0.zip
Algorithm Hash digest
SHA256 c2a9fdd7d4ae34df264e901d47be04d31abd9c64e83bd5a26206c9f12a295a7f
MD5 8f4fac9b1f66ffe133210dde77238c9c
BLAKE2b-256 7e50c24c633b39fb10e871f37e28ac85fa2f991cab4a4e72b83eaaf6cb7f0587

See more details on using hashes here.

File details

Details for the file smtpdropbox-1.0.tar.gz.

File metadata

  • Download URL: smtpdropbox-1.0.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for smtpdropbox-1.0.tar.gz
Algorithm Hash digest
SHA256 336b50dacd94fca9955fbe5d2766a99237a470aa100e27c30503eb0026004b46
MD5 f0a005414b3ce3c16c6050496f64b678
BLAKE2b-256 fb864e3ef05c6bac39cb9d5955acbf63270beef68c4ae471c310b40000f2b1b9

See more details on using hashes here.

File details

Details for the file smtpdropbox-1.0.tar.bz2.

File metadata

  • Download URL: smtpdropbox-1.0.tar.bz2
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for smtpdropbox-1.0.tar.bz2
Algorithm Hash digest
SHA256 5d5a260104a5d95bd63d321525b5f49ea7392186dd8e31213e3578579d23bc36
MD5 6838f1897431b3be96ff244b83a64937
BLAKE2b-256 ad4c310d57b2f44e9abd3192f867502edd7f1157a158d72ac85cb3c4bb9462f8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page