# aahnik/bulk-email-sender architecture

> Architecture diagram of the GitHub repository aahnik/bulk-email-sender, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aahnik/bulk-email-sender
- Repository: https://github.com/aahnik/bulk-email-sender

## Overview

bulk-email-sender turns a CSV of recipients and values into personalized messages from a Markdown or HTML template, optionally attaches confirmed files, and sends each message through Zoho SMTP. The main workflow is implemented in send.py; settings.py loads credentials and message options. The README documents the input files and capabilities, while source evidence for internal calls comes from send.py. The tree does not include the runtime input files, so they are shown as external inputs.

Main entry points: [`send.py`](https://github.com/aahnik/bulk-email-sender/blob/master/send.py) (Send Workflow), [`settings.py`](https://github.com/aahnik/bulk-email-sender/blob/master/settings.py) (Settings Loader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["Message Inputs"]
  node_template["Message Template"]
  node_recipient_data["Recipient CSV"]
  node_attachment_files["Attachment Files"]
  node_personalization["CSV Personalization<br/>[send.py]"]
  node_attachment_confirmation["Attachment Confirmation<br/>[send.py]"]
end

subgraph group_sending["Email Delivery"]
  node_sender["Send Workflow<br/>[send.py]"]
  node_message_formatting["Message Formatting<br/>[send.py]"]
  node_message_assembly["MIME Assembly<br/>[send.py]"]
  node_smtp["Zoho SMTP"]
  node_delivery_report["Send Report<br/>[send.py]"]
end

subgraph group_config["Configuration"]
  node_credentials["SMTP Credentials"]
  node_settings["Settings Loader<br/>[settings.py]"]
end

node_user(("Operator"))

node_user -->|"runs"| node_sender
node_user -->|"provides"| node_template
node_user -->|"provides"| node_recipient_data
node_user -->|"provides"| node_attachment_files
node_user -->|"sets"| node_credentials
node_credentials -->|"loads"| node_settings
node_sender -->|"imports"| node_settings
node_sender -->|"reads"| node_template
node_sender -->|"reads"| node_recipient_data
node_sender -->|"iterates rows"| node_personalization
node_personalization -->|"reads"| node_recipient_data
node_sender -->|"confirms files"| node_attachment_confirmation
node_attachment_confirmation -->|"reads"| node_attachment_files
node_sender -->|"formats body"| node_message_formatting
node_sender -->|"assembles message"| node_message_assembly
node_sender -->|"logs in and sends"| node_smtp
node_sender -->|"prints count"| node_delivery_report

click node_settings "https://github.com/aahnik/bulk-email-sender/blob/master/settings.py"
click node_sender "https://github.com/aahnik/bulk-email-sender/blob/master/send.py"
click node_personalization "https://github.com/aahnik/bulk-email-sender/blob/master/send.py"
click node_attachment_confirmation "https://github.com/aahnik/bulk-email-sender/blob/master/send.py"
click node_message_formatting "https://github.com/aahnik/bulk-email-sender/blob/master/send.py"
click node_message_assembly "https://github.com/aahnik/bulk-email-sender/blob/master/send.py"
click node_delivery_report "https://github.com/aahnik/bulk-email-sender/blob/master/send.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_template,node_recipient_data,node_attachment_files,node_personalization,node_attachment_confirmation toneBlue
class node_sender,node_message_formatting,node_message_assembly,node_smtp,node_delivery_report toneAmber
class node_credentials,node_settings toneMint
class node_user toneIndigo
```

## Components

### Message Inputs

- **Message Template**
- **Recipient CSV**
- **Attachment Files**
- [CSV Personalization](https://github.com/aahnik/bulk-email-sender/blob/master/send.py): `send.py`
- [Attachment Confirmation](https://github.com/aahnik/bulk-email-sender/blob/master/send.py): `send.py`

### Email Delivery

- [Send Workflow](https://github.com/aahnik/bulk-email-sender/blob/master/send.py): `send.py`
- [Message Formatting](https://github.com/aahnik/bulk-email-sender/blob/master/send.py): `send.py`
- [MIME Assembly](https://github.com/aahnik/bulk-email-sender/blob/master/send.py): `send.py`
- **Zoho SMTP**
- [Send Report](https://github.com/aahnik/bulk-email-sender/blob/master/send.py): `send.py`

### Configuration

- **SMTP Credentials**
- [Settings Loader](https://github.com/aahnik/bulk-email-sender/blob/master/settings.py): `settings.py`

### Other components

- **Operator**

## Connections

- Operator → Send Workflow: runs (evidence: `README.md`)
- Operator → Message Template: provides (evidence: `README.md`)
- Operator → Recipient CSV: provides (evidence: `README.md`)
- Operator → Attachment Files: provides (evidence: `README.md`)
- Operator → SMTP Credentials: sets (evidence: `README.md`)
- SMTP Credentials → Settings Loader: loads (evidence: `settings.py`)
- Send Workflow → Settings Loader: imports (evidence: `send.py`)
- Send Workflow → Message Template: reads (evidence: `send.py`)
- Send Workflow → Recipient CSV: reads (evidence: `send.py`)
- Send Workflow → CSV Personalization: iterates rows (evidence: `send.py`)
- CSV Personalization → Recipient CSV: reads (evidence: `send.py`)
- Send Workflow → Attachment Confirmation: confirms files (evidence: `send.py`)
- Attachment Confirmation → Attachment Files: reads (evidence: `send.py`)
- Send Workflow → Message Formatting: formats body (evidence: `send.py`)
- Send Workflow → MIME Assembly: assembles message (evidence: `send.py`)
- Send Workflow → Zoho SMTP: logs in and sends (evidence: `send.py`)
- Send Workflow → Send Report: prints count (evidence: `send.py`)
