Skip to content

Add email automation for Stanford Bachata Club Gmail #30

@brando90

Description

@brando90

Summary

Add support for sending emails from the Stanford Bachata Club Gmail account via uutils.emailing, for event announcements, member communications, etc.

Motivation

Automate recurring emails for the Stanford Bachata Club — event reminders, practice schedules, welcome emails to new members, etc.

Proposed Implementation

The uutils.emailing module already supports Gmail SMTP. This issue is about:

  1. Setting up the Bachata Gmail app password
  2. Creating convenience functions/config for Bachata-specific emails
  3. Building email templates for common messages

Usage

from uutils.emailing import send_email_smtp

# Send from Bachata Gmail
send_email_smtp(
    to="member@stanford.edu",
    subject="Bachata Practice Tonight @ 8pm",
    body="Hey! Reminder that we have practice tonight...",
    smtp_user="stanfordbachata@gmail.com",  # or whatever the address is
    smtp_pass_file="~/keys/bachata_gmail_app_password.txt",
)

Optional: Batch / mailing list support

def send_bachata_announcement(subject, body, recipients_file="~/keys/bachata_members.csv"):
    """Send an announcement to all Bachata club members."""
    ...

🔐 Secrets & Security

  • App password stored in ~/keys/bachata_gmail_app_password.txt — NEVER in repo
  • Member email list (if used) stored in ~/keys/bachata_members.csv — NEVER in repo
  • Use Gmail App Passwords (not the main account password)
  • chmod 600 on all credential files

🧑 Human Interaction Required

  • One-time: Log into the Bachata Gmail account
  • One-time: Enable 2-Step Verification on the account
  • One-time: Generate App Password: https://myaccount.google.com/apppasswords
  • One-time: Save to ~/keys/bachata_gmail_app_password.txt
  • Per-email: Review content before sending (use dry_run=True for preview)

💻 Machine Uptime

  • Does NOT require machine to stay on
  • Can be run as one-shot script or scheduled via cron
  • For scheduled emails (e.g., weekly reminders): machine must be on at scheduled time

Tasks

  • Set up Bachata Gmail app password and save to ~/keys/
  • Test sending a basic email via send_email_smtp()
  • Create convenience function send_bachata_email() if useful
  • Optionally: create email templates for common announcements
  • Optionally: add batch sending to a member list
  • Document setup steps

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions