Skip to content

anldrms/flags

Repository files navigation

Embassy Flag Request Project

An automated system to send personalized flag request emails to embassies worldwide.

Overview

This project helps you send polite, personalized requests to embassies in Canada (Toronto and Ottawa) asking for their national flags for your personal collection.

Two Lists Available

  1. Public List (embassies_public.json) - All countries
  2. Private List (embassies_private.json) - Excludes Taiwan, Netherlands, Russia

Note: The private list is for personal use only and should not be shared publicly.

Files

  • embassies_public.json - Public embassy list (all countries)
  • embassies_private.json - Private embassy list (excludes Taiwan, Netherlands, Russia) - DO NOT COMMIT TO PUBLIC REPO
  • email_template.txt - Personalized email template with your information
  • email_template_public.txt - Generic email template (no personal info)
  • send_flags_request.py - Python script to send emails via ProtonMail
  • check_embassies.py - Utility to verify embassy lists
  • README.md - This file

Prerequisites

  1. Python 3.6+ installed on your system
  2. ProtonMail account with SMTP access enabled

ProtonMail Setup Options

Option 1: ProtonMail Bridge (Recommended)

  1. Download and install ProtonMail Bridge
  2. Log in to Bridge with your ProtonMail account
  3. Bridge will provide local SMTP credentials (usually 127.0.0.1:1025)
  4. Use these credentials when running the script

Option 2: ProtonMail App Password

  1. Log in to ProtonMail web interface
  2. Go to Settings → Security → App passwords
  3. Create a new app password for this script
  4. Use your regular email and the app password when running the script

Installation

# Clone the repository
git clone https://github.com/anldrms/flags.git
cd flags

# Make the script executable
chmod +x send_flags_request.py

Usage

Test Mode (Recommended First)

Run in test mode to send emails to only the first 3 embassies:

python3 send_flags_request.py

When prompted:

  1. Enter your ProtonMail email address
  2. Enter your ProtonMail password or app password
  3. Select SMTP server option
  4. Choose list type (1=public, 2=private)
  5. Choose Y for test mode
  6. Set delay between emails (5-10 seconds recommended)

Full Campaign

Once you've tested and everything works:

python3 send_flags_request.py

Follow the same prompts but choose N for test mode. This will send to all ~190 embassies.

Important Notes

Rate Limiting

  • The script includes delays between emails to avoid rate limiting
  • Recommended delay: 5-10 seconds between emails
  • Total time for full campaign: ~15-30 minutes

Email Deliverability

  • Some embassy email addresses may be outdated or incorrect
  • You may receive bounce-back notifications for invalid addresses
  • Check your ProtonMail inbox for responses

Legal & Ethical Considerations

  • This script sends polite, legitimate requests
  • All requests are personalized and respectful
  • You can stop the script at any time (Ctrl+C)

Customization

Modify Email Template

Edit email_template.txt to change the message. Use {{COUNTRY}} as a placeholder for the country name.

Modify Embassy Lists

Edit embassies_public.json or embassies_private.json to add, remove, or update embassy information:

{
  "country": "Country Name",
  "city": "Toronto or Ottawa",
  "email": "embassy@example.com",
  "address": "Embassy address"
}

Add More Countries

You can add more embassies by appending to the embassies.json file.

Logging

All email sending attempts are logged to:

  • Console output (real-time)
  • embassy_emails.log file (persistent record)

Check the log file to see which emails were successful and which failed.

Troubleshooting

Authentication Failed

  • Verify your ProtonMail credentials
  • If using regular password, try creating an app password instead
  • If using Bridge, make sure it's running

Connection Timeout

  • Check your internet connection
  • Verify SMTP server address and port
  • If using Bridge, ensure it's running and connected

Rate Limiting

  • Increase the delay between emails
  • ProtonMail free accounts have sending limits (check your plan)

Emails Not Sending

  • Check embassy_emails.log for detailed error messages
  • Verify the script has internet access
  • Try test mode first to diagnose issues

Future Enhancements

  • Web interface for easier configuration
  • Track email responses and update status
  • Generate reports of successful/failed requests
  • Add support for other email providers
  • Create separate public vs private embassy lists

License

MIT License - Feel free to modify and use as needed.

Support

If you encounter issues:

  1. Check the log file (embassy_emails.log)
  2. Review the troubleshooting section
  3. Open an issue on GitHub

Good luck with your flag collection! 🌍🏴

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages