Two Python scripts for creating colorful, rainbow computer-styled HTML emails from Markdown content. Markdown is converted to colorful HTML for insertion into eMails. As each eMail is created, you can add a personalized message.
On Linux, Thunderbird can send each one automatically. Fork this repository and have AI walk you through adapting it to your operating system.
pip install markdown
sudo apt install wl-clipboard # For clipboard functionality
sudo apt install xdotool # For batch email automation (optional)For batch processing, install Thunderbird.
-
Write your email content
- Edit
email-input.mdwith your message in Markdown format - Use
{{top}}placeholder where personalized content should go
- Edit
-
Basic generation
python3 rainbow_email.py
- Converts
email-input.mdto colorful HTML - Copies HTML to clipboard automatically
- Paste into email client with Ctrl+V
- Converts
-
With personalized top content
python3 rainbow_email.py "Hi **Sarah**! Hope you're *doing well*."- Replaces
{{top}}with your personalized message - Supports bold, italic, and links
- Replaces
-
Generate preview file
python3 rainbow_email.py --preview
- Creates
preview.htmlto view in browser - Also copies to clipboard
- Creates
-
Save to file
python3 rainbow_email.py "Hello!" --save my_email.html- Saves HTML to specified file instead of clipboard
-
Create recipient list
- Make a text file (e.g.,
recipients.txt) with one email per line:
sarah@example.com john@company.org mary@startup.io - Make a text file (e.g.,
-
Prepare base email
- Write your template in
email-input.md - Include
{{top}}where personal content goes
- Write your template in
-
Run batch processor
python3 batch_rainbow_email.py "Subject Line" recipients.txt -
For each recipient, the script will:
- Show recipient email address
- Prompt: "Enter personalized content (supports markdown):"
- You type personalized message (supports bold, italic, links)
- Press Enter twice to finish, or type 'skip' for no personalization
- Generate HTML and copy to clipboard
- Open email client with recipient and subject pre-filled
- Auto-paste HTML content (if xdotool available)
- Ask if you want to continue to next recipient
-
Options:
# Create drafts (default) python3 batch_rainbow_email.py "Monthly Update" recipients.txt --drafts # Try to send directly python3 batch_rainbow_email.py "Newsletter" recipients.txt --send
{{top}}
**Check** out my latest _work_ at [my portfolio](https://example.com).
Carry on,
Arielfriend1@example.com
colleague@company.org
contact@startup.io
