CLI tool to send ebooks to Kindle via email
Find a file
Brian O'Callaghan 842b6e3725 Read sender/recipient addresses from environment variables
SEND2KINDLE_FROM and SEND2KINDLE_TO replace hardcoded email addresses.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 00:22:50 -05:00
README.md Read sender/recipient addresses from environment variables 2026-04-25 00:22:50 -05:00
send2kindle.py Read sender/recipient addresses from environment variables 2026-04-25 00:22:50 -05:00

send2kindle

A minimal CLI tool to send an ebook file to a Kindle email address via Gmail.

Requirements

Setup

Export the following environment variables (add to ~/.zshrc or ~/.bashrc):

export GMAIL_APP_PASSWORD="xxxx xxxx xxxx xxxx"
export SEND2KINDLE_FROM="you@gmail.com"
export SEND2KINDLE_TO="you_xxx@kindle.com"

Optionally, symlink the script so you can call it as send2kindle from anywhere:

ln -s /path/to/send2kindle.py /usr/local/bin/send2kindle

Usage

send2kindle path/to/book.epub

The ebook is sent as an attachment to your Kindle email address. The subject is set to the filename, which is the format Amazon's email-to-Kindle service expects.

Configuration

All configuration is via environment variables:

Variable Purpose
GMAIL_APP_PASSWORD Gmail App Password for SMTP authentication
SEND2KINDLE_FROM Sender address (your Gmail address)
SEND2KINDLE_TO Recipient address (your Kindle email address)