WP Manifestindependent plugin directory
manifest / email / proxy-hub-mail

Proxy Hub Mail

Sends Gravity Forms and Contact Form 7 email through the Proxy Hub mail API — authenticated sender domains, delivery logging, and no local SMTP configuration.

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/justin-netage/proxy-hub-mail/archive/refs/heads/main.zip
Updates itself. It ships its own updater, so new versions appear under Dashboard → Updates.

WordPress plugin that routes Gravity Forms notifications and Contact Form 7 mail — and optionally all other wp_mail() traffic — through the Proxy Hub mail API instead of the server's local mail/SMTP setup.

Sends go out over the hub's authenticated sender domains (SPF/DKIM managed centrally in SendGrid), and every attempt is recorded in the hub's per-site mail log. Each hub environment (staging / live) has its own API key, so a staging copy of the site logs its mail separately from production.

Installation

  1. In the Proxy Hub dashboard, open the WordPress section and add the site (staging and/or live environment). Authenticate a sender domain in the environment's Mail settings, then copy the environment's API key.
  2. Install this plugin (upload the zip from the hub's WordPress page, or copy this repository into wp-content/plugins/proxy-hub-mail) and activate it.
  3. Go to Settings → Proxy Hub Mail:
    • Hub URL — the Proxy Hub base URL.
    • API key — the environment's key (staging key on staging copies, live key in production).
    • From email / name — optional; must be on the sender domain authenticated for the site on the hub.
    • Routing toggles for Gravity Forms, Contact Form 7, and all other WordPress mail, plus fallback to normal delivery when the hub is unreachable (recommended: on).
  4. Use Send test email to confirm the connection end to end.

How it works

Hook Coverage Mechanism
gform_pre_send_email Gravity Forms notifications Sends via the hub, then sets abort_email so GF skips wp_mail
pre_wp_mail Contact Form 7 (detected via the active WPCF7_Submission) and, when "route all" is on, every other wp_mail() Short-circuits wp_mail with the hub result

All sends go to POST {hub}/api/mail/send-key with the environment's API key as a bearer token. Payload handling:

  • Plain-text mail is mirrored into a minimal HTML body (the API requires html) with the original kept as text.
  • Cc recipients join the to list; each Bcc recipient gets its own separate send so addresses never leak.
  • Attachments are base64-encoded within the API caps (5 files / 10 MB base64); mail exceeding a cap (or the 50 KB body limit) falls back to normal WordPress delivery instead of being dropped.
  • Sends are tagged formType: gravity-forms | contact-form-7 | wp-mail | wp-test for the hub mail log and SendGrid categories.

Requires WordPress 5.7+ (for pre_wp_mail) and PHP 7.4+. No external dependencies.

Updates

Installed copies self-update from this repository's GitHub releases: the plugin declares Update URI: https://github.com/justin-netage/proxy-hub-mail and includes/class-phm-updater.php answers WordPress core's update_plugins_github.com check (WP 5.8+) with the latest release, so new versions appear on the normal Dashboard → Updates screen. The update package is the proxy-hub-mail.zip asset attached to each release — never the auto-generated tag zipball, whose folder name would break the install. Release lookups are cached for 12 hours per site (public repo, no auth needed).

Releasing a new version

  1. Make the change in the hub repo copy (see Development below) and sync it here, keeping the two identical.
  2. Bump Version: and PHM_VERSION in proxy-hub-mail.php (both copies) and add a changelog entry in readme.txt.
  3. Tag and push: git tag vX.Y.Z && git push origin vX.Y.Z.
  4. The Release workflow (.github/workflows/release.yml) verifies the tag matches the plugin header, builds proxy-hub-mail.zip with the correct proxy-hub-mail/ top-level folder, and publishes the GitHub release. Sites pick the update up within ~12 hours (or immediately via Dashboard → Updates → Check again after the transient expires).

Development

The copy the hub actually ships (its dashboard "Download plugin" button builds a zip at runtime) lives in the hub repository at netage-proxy-hub/wordpress-plugin/proxy-hub-mail/. Treat that copy as the source of truth and sync changes here — the two directories should stay identical. Hub-side integration docs: netage-proxy-hub/docs/WORDPRESS_PLUGIN.md.

License

GPL-2.0-or-later.