An automated system to send personalized flag request emails to embassies worldwide.
This project helps you send polite, personalized requests to embassies in Canada (Toronto and Ottawa) asking for their national flags for your personal collection.
- Public List (
embassies_public.json) - All countries - Private List (
embassies_private.json) - Excludes Taiwan, Netherlands, Russia
Note: The private list is for personal use only and should not be shared publicly.
embassies_public.json- Public embassy list (all countries)embassies_private.json- Private embassy list (excludes Taiwan, Netherlands, Russia) - DO NOT COMMIT TO PUBLIC REPOemail_template.txt- Personalized email template with your informationemail_template_public.txt- Generic email template (no personal info)send_flags_request.py- Python script to send emails via ProtonMailcheck_embassies.py- Utility to verify embassy listsREADME.md- This file
- Python 3.6+ installed on your system
- ProtonMail account with SMTP access enabled
- Download and install ProtonMail Bridge
- Log in to Bridge with your ProtonMail account
- Bridge will provide local SMTP credentials (usually 127.0.0.1:1025)
- Use these credentials when running the script
- Log in to ProtonMail web interface
- Go to Settings → Security → App passwords
- Create a new app password for this script
- Use your regular email and the app password when running the script
# Clone the repository
git clone https://github.com/anldrms/flags.git
cd flags
# Make the script executable
chmod +x send_flags_request.pyRun in test mode to send emails to only the first 3 embassies:
python3 send_flags_request.pyWhen prompted:
- Enter your ProtonMail email address
- Enter your ProtonMail password or app password
- Select SMTP server option
- Choose list type (1=public, 2=private)
- Choose Y for test mode
- Set delay between emails (5-10 seconds recommended)
Once you've tested and everything works:
python3 send_flags_request.pyFollow the same prompts but choose N for test mode. This will send to all ~190 embassies.
- 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
- Some embassy email addresses may be outdated or incorrect
- You may receive bounce-back notifications for invalid addresses
- Check your ProtonMail inbox for responses
- This script sends polite, legitimate requests
- All requests are personalized and respectful
- You can stop the script at any time (Ctrl+C)
Edit email_template.txt to change the message. Use {{COUNTRY}} as a placeholder for the country name.
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"
}You can add more embassies by appending to the embassies.json file.
All email sending attempts are logged to:
- Console output (real-time)
embassy_emails.logfile (persistent record)
Check the log file to see which emails were successful and which failed.
- Verify your ProtonMail credentials
- If using regular password, try creating an app password instead
- If using Bridge, make sure it's running
- Check your internet connection
- Verify SMTP server address and port
- If using Bridge, ensure it's running and connected
- Increase the delay between emails
- ProtonMail free accounts have sending limits (check your plan)
- Check
embassy_emails.logfor detailed error messages - Verify the script has internet access
- Try test mode first to diagnose issues
- 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
MIT License - Feel free to modify and use as needed.
If you encounter issues:
- Check the log file (
embassy_emails.log) - Review the troubleshooting section
- Open an issue on GitHub
Good luck with your flag collection! 🌍🏴