=== DWD Email ===
Contributors: dwd
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 1.3.3
License: GPLv2 or later

Shared-mailbox webmail for WordPress with IMAP/SMTP accounts, newsletters, donation campaigns, and a global Appleseed opt-out list.

== Description ==

DWD Email provides a Roundcube-inspired webmail client for company shared mailboxes (for example Comcenter@example.com). Admins configure IMAP/SMTP once, assign access to WordPress roles and users, and staff on shift can read and send mail from the admin Inbox or a front-end page.

All outbound mail sent through the plugin is tracked (queued, sent, opened, clicked) for company audit.

Donation campaigns: named mailing lists (Top 100 likely business donors first), business prospect address book, CSV import, merge-tagged solicitation emails, batched SMTP sends, send log, and public unsubscribe. Campaigns require an explicit list so the wrong audience is never emailed.

Newsletters (merged from DWD Newsletter): campaigns, subscribers, groups, queue, automations, and stats inside the Email admin.

Global opt-out list blocks all Appleseed outbound mail from this plugin; restoration requires wet-signature attestation.

Gutenberg blocks (post editor and Site Editor): Newsletter signup, Newsletter signup button, and Webmail inbox.

== Changelog ==

= 1.3.3 =
* Multisite: network activation/deactivation, new-site bootstrap, per-site uninstall loop.

= 1.3.2 =
* Security: ignore unsigned heartbeat site_token.

= 1.3.1 =
* Security: harden click-tracking redirects (http/https, no userinfo, public host only).
* Security: signed-only remote wipe client.

= 1.3.0 =
* Donation mailing lists: campaigns must choose a named list before queue/send (no all-prospects blast).
* Seed list Prospective businesses — likely donors (Top 100) with scored CSV import (likelihood_score / likelihood_tier).
* Donations → Lists admin panel; newsletter groups remain separate from donation lists.

= 1.2.2 =
* Fix fatal error when embedding newsletters after the standalone DWD Newsletter plugin is deactivated (call init_admin, not a missing init).
* Align embedded newsletter boot with standalone init (admin-only admin hooks, upgrades on boot, safe callable guards).

= 1.2.1 =
* Gutenberg blocks for block themes and the Site Editor: Newsletter signup, Newsletter signup button (modal), and Webmail inbox.
* Blocks support theme styles (color, typography, spacing, border) and appear under the DWD Email inserter category.

= 1.2.0 =
* Tabbed admin shell (Email, Donations, Newsletters, Opt-out, Tools) with left sidebars and legacy menu redirects.
* Merged DWD Newsletter into DWD Email (embedded module; deactivate standalone Newsletter if both are active).
* Global suppression/opt-out list enforced on webmail SMTP, donation campaigns, and newsletters.
* Public opt-out warning: covers all Appleseed News mailings; reverse only via wet signature + ID photocopy (admin attestation).
* Tools tab: update/sync, toggleable debug logger with retention, backup & restore.
* Prefer sending newsletters through a selected DWD Email mailbox account when configured.

= 1.1.2 =
* Correct donation email one-time gift levels (full-time month ≈ $15,000–$16,000) and state gifts are held until the $180,000 goal is reached.

= 1.1.1 =
* Donation screens and Email Settings include a clear path back to the Email dashboard (and between donation sections).

= 1.1.0 =
* Donation campaigns: prospects CRM, CSV import (including bundled Richland County sample), campaign editor with Appleseed templates and merge tags, test send, batched campaign sending, send log, and unsubscribe page.
* From/Reply-To overrides for campaign mail (Carl Gilliam / comcenter@).

= 1.0.20 =
* Fix: Administrators no longer get “Sorry, you are not allowed to access this page” on the Email dashboard after updates (caps re-granted; menus no longer use null parents).

= 1.0.19 =
* Attachment preview modal shows images (including TIFF converted to PNG when possible), PDFs, and text files instead of only the filename.
* Fixes MIME detection for attachments labeled as octet-stream so Open can preview by file type.

= 1.0.18 =
* First-time setup wizard and Add mailbox wizard (step-by-step IMAP/SMTP).
* Help tooltips on every wizard and account field explaining what to enter.

= 1.0.17 =
* Incoming HTML security filter: blocks scripts and other non-HTML/CSS content, alerts staff what was removed, and shows only sanitized HTML/CSS.

= 1.0.16 =
* Fix: Load HTML no longer dumps raw CSS as text; email styles stay in &lt;style&gt; and render in the preview.

= 1.0.15 =
* Multi-select messages in the list; bulk Delete and Mark as spam (conversation rows select the whole thread).

= 1.0.14 =
* Load HTML renders the message as formatted content (not raw tags); button becomes “HTML is loaded”.
* View source / View message toggle for HTML mail.

= 1.0.13 =
* Activity log: clearer per-mailbox audit of which WordPress staff/admin read, replied, forwarded, sent, deleted, moved, marked spam, opened attachments, or set reminders.
* Activity screen: filter by mailbox and action; show staff display name, login, and email.

= 1.0.12 =
* Reply, Forward, Move, Spam, and Delete appear at the top and bottom of the reading pane.
* Delete removes the message from the mail server immediately (no confirmation prompt).

= 1.0.11 =
* Left pane: collapsible mailbox titles with folders underneath (account dropdown removed).
* Unread counts beside INBOX and other folders (and on the mailbox header for INBOX).

= 1.0.10 =
* Fix: read-receipt ignore notice no longer shows on mail you sent (Sent folder / From = this mailbox).

= 1.0.9 =
* View message attachments in the reading pane; open in a preview modal (images, PDF, text) or download.

= 1.0.8 =
* Message list sort: newest/oldest by date received, unread first, or read first (choice remembered in the browser).

= 1.0.7 =
* Per-account signatures (Accounts settings; inserted when composing).
* Conversation view toggle (group related messages in the list / reading pane).
* Clearer unread vs read in the message list (bold + badge for unread; normal weight for read).
* Follow-up reminders when sending (remind after N days); Reminders admin screen + email notice when due.

= 1.0.6 =
* Fix: Hub / Plugins file updates now run DB migrations and page sync (and clear “maintenance recommended”).
* Register with DWD Plugins Hub maintenance sync (Run update returns to the hub).

= 1.0.5 =
* Per-account: ignore read-receipt requests (no MDN replies; outbound receipt headers stripped).
* Per-account: require “Load HTML” before rendering HTML (plain text first; blocks remote images/trackers until then).

= 1.0.4 =
* Spam: mark as spam deletes on the server and blocks future mail from that sender (auto-purge).
* Delete permanently removes the message from the IMAP server (STORE + EXPUNGE).
* Blocked senders admin screen to review/unblock.

= 1.0.3 =
* Custom IMAP folders: create, rename, and delete; file mail with Move.

= 1.0.2 =
* Fix message list showing "(no subject)" for every row (IMAP header literal parsing).
* Improve message body MIME decoding (multipart / base64 / quoted-printable).

= 1.0.1 =
* Front-end UI redesign: high-contrast self-contained buttons/controls (no theme washout), clearer hierarchy, better mobile layout.

= 1.0.0 =
* Initial release: shared accounts, ACL, IMAP/SMTP client, tracking, activity log.
