# bigbluehat/atmailopen architecture

> Architecture diagram of the GitHub repository bigbluehat/atmailopen, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bigbluehat/atmailopen
- Repository: https://github.com/bigbluehat/atmailopen

## Overview

AtMail Open is a PHP webmail application for accessing existing IMAP accounts. Its principal workflow begins at the web interface, authenticates a user, presents mail, and supports reading and composing messages. The tree also shows address-book, search, LDAP, filtering, spell-check, and videomail capabilities. The README documents IMAP access and an installation wizard; sampled source confirms the login entry point and some mail/session operations, but most feature-to-library wiring is not shown, so those links are omitted.

Main entry points: [`index.php`](https://github.com/bigbluehat/atmailopen/blob/master/index.php) (Login entry), [`libs/IMAP_Client.php`](https://github.com/bigbluehat/atmailopen/blob/master/libs/IMAP_Client.php) (IMAP client), [`install/index.php`](https://github.com/bigbluehat/atmailopen/blob/master/install/index.php) (Install wizard), [`libs/Atmail/GetMail.php`](https://github.com/bigbluehat/atmailopen/blob/master/libs/Atmail/GetMail.php) (Mail retrieval)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_webmail["Webmail interface"]
  node_login["Login entry<br/>[index.php]"]
  node_global["Application context<br/>[Global.php]"]
  node_interface["Mail interface"]
  node_auth["Authentication<br/>[Auth.php]"]
  node_session["Session state<br/>[Session.php]"]
  node_database[("SQL database<br/>[SQL.php]")]
end

subgraph group_mail["Mail handling"]
  node_reader["Read messages<br/>[reademail.php]"]
  node_viewer["Show message<br/>[showmail.php]"]
  node_send["Send mail<br/>[sendmail.php]"]
  node_mail_access["Mail retrieval<br/>[GetMail.php]"]
  node_imap_client["IMAP client<br/>[IMAP_Client.php]"]
  node_message_parse["MIME parsing<br/>[mime_parser.php]"]
  node_message_read["Message reader<br/>[ReadMsg.php]"]
  node_message_send["Message sender<br/>[SendMsg.php]"]
end

subgraph group_personal["User features"]
  node_addressbook["Address book<br/>[abook.php]"]
  node_search["Mail search<br/>[search.php]"]
  node_ldap["LDAP lookup<br/>[ldap.php]"]
  node_filters["Mail filters<br/>[Filter.class.php]"]
  node_spell["Spell checking<br/>[spell.php]"]
  node_videomail["Videomail<br/>[videomail.php]"]
end

subgraph group_setup["Account setup"]
  node_installer["Install wizard<br/>[index.php]"]
  node_config["Application configuration<br/>[Global_Base.php]"]
end

node_user(("Webmail user"))
node_imap_server{{"IMAP server"}}

node_user -->|"opens"| node_login
node_login -->|"loads context"| node_global
node_login -->|"renders"| node_interface
node_login -->|"gets auth"| node_auth
node_login -->|"uses on logout"| node_session
node_user -->|"requests"| node_reader
node_user -->|"opens"| node_viewer
node_user -->|"submits"| node_send
node_user -->|"manages contacts"| node_addressbook
node_user -->|"searches"| node_search
node_user -.->|"looks up"| node_ldap
node_user -->|"configures"| node_filters
node_user -->|"checks spelling"| node_spell
node_user -->|"uses"| node_videomail
node_user -->|"starts setup"| node_installer
node_installer -->|"initializes"| node_config
node_mail_access -->|"uses"| node_imap_client
node_imap_client -->|"communicates"| node_imap_server
node_message_read -->|"parses MIME"| node_message_parse
node_message_send -.->|"delivers via mail service"| node_imap_server

click node_login "https://github.com/bigbluehat/atmailopen/blob/master/index.php"
click node_global "https://github.com/bigbluehat/atmailopen/blob/master/libs/Atmail/Global.php"
click node_interface "https://github.com/bigbluehat/atmailopen/blob/master/html/english/simple/showmail_interface.html"
click node_reader "https://github.com/bigbluehat/atmailopen/blob/master/reademail.php"
click node_viewer "https://github.com/bigbluehat/atmailopen/blob/master/showmail.php"
click node_send "https://github.com/bigbluehat/atmailopen/blob/master/sendmail.php"
click node_mail_access "https://github.com/bigbluehat/atmailopen/blob/master/libs/Atmail/GetMail.php"
click node_imap_client "https://github.com/bigbluehat/atmailopen/blob/master/libs/IMAP_Client.php"
click node_message_parse "https://github.com/bigbluehat/atmailopen/blob/master/libs/mime_parser.php"
click node_message_read "https://github.com/bigbluehat/atmailopen/blob/master/libs/Atmail/ReadMsg.php"
click node_message_send "https://github.com/bigbluehat/atmailopen/blob/master/libs/Atmail/SendMsg.php"
click node_addressbook "https://github.com/bigbluehat/atmailopen/blob/master/abook.php"
click node_search "https://github.com/bigbluehat/atmailopen/blob/master/search.php"
click node_ldap "https://github.com/bigbluehat/atmailopen/blob/master/ldap.php"
click node_filters "https://github.com/bigbluehat/atmailopen/blob/master/libs/Atmail/Filter.class.php"
click node_spell "https://github.com/bigbluehat/atmailopen/blob/master/spell.php"
click node_videomail "https://github.com/bigbluehat/atmailopen/blob/master/videomail.php"
click node_auth "https://github.com/bigbluehat/atmailopen/blob/master/libs/Atmail/Auth.php"
click node_session "https://github.com/bigbluehat/atmailopen/blob/master/libs/Atmail/Session.php"
click node_database "https://github.com/bigbluehat/atmailopen/blob/master/libs/Atmail/SQL.php"
click node_installer "https://github.com/bigbluehat/atmailopen/blob/master/install/index.php"
click node_config "https://github.com/bigbluehat/atmailopen/blob/master/libs/Atmail/Global_Base.php"

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_login,node_global,node_interface,node_auth,node_session,node_database,node_user toneBlue
class node_reader,node_viewer,node_send,node_mail_access,node_imap_client,node_message_parse,node_message_read,node_message_send toneAmber
class node_addressbook,node_search,node_ldap,node_filters,node_spell,node_videomail,node_imap_server toneMint
class node_installer,node_config toneRose
```

## Components

### Webmail interface

- [Login entry](https://github.com/bigbluehat/atmailopen/blob/master/index.php): `index.php`
- [Application context](https://github.com/bigbluehat/atmailopen/blob/master/libs/Atmail/Global.php): `libs/Atmail/Global.php`
- [Mail interface](https://github.com/bigbluehat/atmailopen/blob/master/html/english/simple/showmail_interface.html): `html/english/simple/showmail_interface.html`
- [Authentication](https://github.com/bigbluehat/atmailopen/blob/master/libs/Atmail/Auth.php): `libs/Atmail/Auth.php`
- [Session state](https://github.com/bigbluehat/atmailopen/blob/master/libs/Atmail/Session.php): `libs/Atmail/Session.php`
- [SQL database](https://github.com/bigbluehat/atmailopen/blob/master/libs/Atmail/SQL.php): `libs/Atmail/SQL.php`

### Mail handling

- [Read messages](https://github.com/bigbluehat/atmailopen/blob/master/reademail.php): `reademail.php`
- [Show message](https://github.com/bigbluehat/atmailopen/blob/master/showmail.php): `showmail.php`
- [Send mail](https://github.com/bigbluehat/atmailopen/blob/master/sendmail.php): `sendmail.php`
- [Mail retrieval](https://github.com/bigbluehat/atmailopen/blob/master/libs/Atmail/GetMail.php): `libs/Atmail/GetMail.php`
- [IMAP client](https://github.com/bigbluehat/atmailopen/blob/master/libs/IMAP_Client.php): `libs/IMAP_Client.php`
- [MIME parsing](https://github.com/bigbluehat/atmailopen/blob/master/libs/mime_parser.php): `libs/mime_parser.php`
- [Message reader](https://github.com/bigbluehat/atmailopen/blob/master/libs/Atmail/ReadMsg.php): `libs/Atmail/ReadMsg.php`
- [Message sender](https://github.com/bigbluehat/atmailopen/blob/master/libs/Atmail/SendMsg.php): `libs/Atmail/SendMsg.php`

### User features

- [Address book](https://github.com/bigbluehat/atmailopen/blob/master/abook.php): `abook.php`
- [Mail search](https://github.com/bigbluehat/atmailopen/blob/master/search.php): `search.php`
- [LDAP lookup](https://github.com/bigbluehat/atmailopen/blob/master/ldap.php): `ldap.php`
- [Mail filters](https://github.com/bigbluehat/atmailopen/blob/master/libs/Atmail/Filter.class.php): `libs/Atmail/Filter.class.php`
- [Spell checking](https://github.com/bigbluehat/atmailopen/blob/master/spell.php): `spell.php`
- [Videomail](https://github.com/bigbluehat/atmailopen/blob/master/videomail.php): `videomail.php`

### Account setup

- [Install wizard](https://github.com/bigbluehat/atmailopen/blob/master/install/index.php): `install/index.php`
- [Application configuration](https://github.com/bigbluehat/atmailopen/blob/master/libs/Atmail/Global_Base.php): `libs/Atmail/Global_Base.php`

### Other components

- **Webmail user**
- **IMAP server**

## Connections

- Webmail user → Login entry: opens
- Login entry → Application context: loads context
- Login entry → Mail interface: renders
- Login entry → Authentication: gets auth
- Login entry → Session state: uses on logout
- Webmail user → Read messages: requests
- Webmail user → Show message: opens
- Webmail user → Send mail: submits
- Webmail user → Address book: manages contacts
- Webmail user → Mail search: searches
- Webmail user → LDAP lookup: looks up
- Webmail user → Mail filters: configures
- Webmail user → Spell checking: checks spelling
- Webmail user → Videomail: uses
- Webmail user → Install wizard: starts setup
- Install wizard → Application configuration: initializes
- Mail retrieval → IMAP client: uses
- IMAP client → IMAP server: communicates
- Message reader → MIME parsing: parses MIME
- Message sender → IMAP server: delivers via mail service
