Sign inSign up

boximus/bookmailer

By boximus

•Updated over 1 year ago

Image
0

239

boximus/bookmailer repository overview

⁠BookMailer

BookMailer is a Python application that automatically sends .epub files to Kindle devices via email. It monitors specified folders and sends any new .epub files to configured email addresses.

⁠Features

  • Monitors multiple folders for new .epub files
  • Automatically sends books to configured Kindle email addresses
  • Tracks sent files using SQLite database to avoid duplicates
  • Configurable folder-to-email mappings via YAML config

⁠Configuration

⁠Environment Variables

The following environment variables must be set:

  • SMTP_URL: Your SMTP server address (e.g., "smtp.gmail.com")
  • SMTP_USER: Your SMTP username/email
  • SMTP_PASS: Your SMTP password/app password
  • BOOKS_ROOT: Root directory where your book folders are located (e.g., "/mnt/media/Books")
  • DB_PATH: Location of the SQLite database file (optional, defaults to "sent_books.db")
  • FROM_ADDRESS: Email address to send from (e.g., "[email protected]⁠")
⁠Config File

Create a config.yaml file and mount it in the container to /app/config.yaml with your folder and email configurations:

folders:
  - path: folder1
    email: [email protected]
  - path: folder2
    email: [email protected]

The path should be relative to the base books directory (/mnt/media/Books by default).

⁠Database

The application maintains a SQLite database (sent_books.db) to track sent files. This prevents duplicate sends and persists across application restarts. NOTE if you don't specify the ENV var for the DB location the DB will not persist across container restarts.

⁠Notes

  • Only .epub files are supported
  • Files are sent via email with no subject line (for Kindle compatibility)
  • There is a 10-second delay between sending each file to avoid rate limiting
  • Make sure your Kindle's email settings allow receiving documents from your sender email address

Tag summary

Content type

Image

Digest

sha256:34142b2d4…

Size

47.1 MB

Last updated

over 1 year ago

docker pull boximus/bookmailer