=== Webmail for WordPress ===
Contributors: jrdevelopr
Tags: webmail, email, imap, smtp, mail
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 8.1
Stable tag: 0.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Your mailbox inside wp-admin. Three panes, any IMAP provider, nothing stored.

== Description ==

Webmail for WordPress puts a real mail client in your dashboard — folders on
the left, messages in the middle, the one you are reading on the right, drawn
with WordPress's own colours, spacing and type so it reads as part of the admin
rather than a guest in it.

It is not an embedded third-party app in an iframe. It is an admin screen that
speaks IMAP.

**Nothing is stored.** Every message is read live from your mail server for
that request. There are no custom database tables, no cron jobs, and no copy of
your mail on the website. Your provider is still the real mailbox: read a
message here and it is read there; delete one here and it is in that account's
bin, where you can get it back.

= What it does =

* **Any IMAP provider.** Presets for Gmail / Google Workspace, Outlook /
  Microsoft 365, Yahoo, iCloud, Fastmail and Zoho — or enter your own servers.
  Picking a preset fills the boxes in and leaves them editable.
* **Send** over that same mailbox's SMTP, with a signature you set once.
* **Search** a folder, answered by the mail server. Uses Gmail's own index
  where it is available.
* **Row actions on hover** — star, and Delete · Archive · Reply.
* **Multi-select** with shift and ctrl/cmd, then act on the lot.
* **Undo.** Archived or deleted something by accident? The offer stands until
  you do something else — no countdown, because "oops" arrives at its own
  speed.
* **Remote images are held back** until you say so, because loading one tells
  the sender you opened the message. Trust a sender once and theirs load from
  then on.
* **Works on a phone.** The icon rail stays on screen, the message fits the
  screen, and every dialog has a way out.

= Who can use it =

Two capabilities, both filterable:

* `publish_posts` — read and send mail
* `edit_others_posts` — change the mailbox settings

Reading the mail is an everyday job; the mailbox password is not.

= POP is not supported =

Deliberately, and it cannot be. POP has no folders, no flags, no server-side
search and no move — and every screen here depends on all four.

= For developers =

The "is this sender someone we have a record for?" feature is a contract with
no implementation shipped. Answer these and it lights up:

`add_filter( 'wmfw_find_contact', function ( $none, $email ) { ... }, 10, 2 );`
`add_filter( 'wmfw_create_contact', function ( $none, $email, $fields ) { ... }, 10, 3 );`

Return `array( 'id' => int, 'name' => string, 'url' => string, 'type' => string )`
or null. Other filters: `wmfw_identity`, `wmfw_signoff`, `wmfw_contact_rows`,
`wmfw_capability`, `wmfw_settings_capability`, `wmfw_log`.

== Installation ==

1. Upload the plugin to `/wp-content/plugins/` and activate it.
2. Go to **Webmail → Settings**, pick your provider, enter the mailbox address
   and password, and turn the switch on.
3. **Webmail** appears in the sidebar. It does not appear before that, on
   purpose — a menu item whose only message is "nothing is connected" is worse
   than none.

Most providers need an **app password** rather than your account password when
two-step verification is on.

== Frequently Asked Questions ==

= Does it work with something other than Gmail? =

Yes. Host, port, encryption and the SMTP triplet are all settings. The presets
are a convenience, not a limit.

= Is my mail copied onto the website? =

No. Nothing is stored. The only things saved are your mailbox settings and the
list of senders whose images you chose to trust — both removed when you
uninstall.

= Where is the password kept? =

In a WordPress option on your own site, never in code. The settings field shows
a mask rather than the value, and re-saving the form does not overwrite what is
stored unless you actually type something new.

= Can I use it on a phone? =

Yes — it is built for 320px up.

== Changelog ==

= 0.1.0 =
* First release as a plugin, ported from a working module.
