WP Manifestindependent plugin directory
manifest / email / smtp-for-proton-mail

SMTP for Proton Mail

Securely routes all WordPress email through Proton Mail’s official SMTP submission service using dedicated SMTP tokens.

★ 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/jarvisryan/smtp-for-proton-mail/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

A small WordPress plugin that routes email sent with wp_mail() through Proton Mail's official SMTP submission service.

This is an independent community project. It is not developed, sponsored, endorsed or supported by Proton AG. Proton Mail is a trade mark of Proton AG.

Requirements

  • WordPress 6.2 or later
  • PHP 7.4 or later
  • A paid Proton Mail plan with an active custom-domain email address
  • A dedicated Proton Mail SMTP token
  • Outbound TCP connections to smtp.protonmail.ch on port 587

Proton Mail's SMTP submission service does not accept a normal account password or mailbox password. It requires a generated SMTP token paired with the custom-domain sender address.

Features

  • Routes all standard WordPress wp_mail() messages through Proton Mail
  • Uses Proton's fixed smtp.protonmail.ch:587 endpoint with STARTTLS
  • Uses PLAIN SMTP authentication, as supported by Proton
  • Encrypts SMTP tokens stored in the WordPress options table
  • Supports credentials defined outside the database in wp-config.php
  • Can force the From address and return path to match the token address
  • Includes a test-email tool for administrators
  • Does not keep a message or recipient log
  • Can remove its settings and token on uninstall

Installation

From a release ZIP

  1. Download smtp-for-proton-mail.zip from the latest release.
  2. In WordPress, go to Plugins > Add New Plugin > Upload Plugin.
  3. Upload the ZIP, install it and activate it.
  4. Go to Settings > Proton Mail SMTP.

From Git

Clone this repository into wp-content/plugins/smtp-for-proton-mail, then activate SMTP for Proton Mail in WordPress.

Proton Mail setup

  1. Sign in to Proton Mail.
  2. Open Settings > All settings > IMAP/SMTP > SMTP tokens.
  3. Generate a separate token for the WordPress website.
  4. Pair it with the active custom-domain address WordPress will send from.
  5. Copy the generated username and token immediately. Proton does not show the token again.
  6. Enter them under Settings > Proton Mail SMTP in WordPress.
  7. Keep Force the From address enabled unless you have a specific, tested reason not to.
  8. Enable SMTP, save, then send a test message.

Do not enter your Proton account password.

For production sites, define the credentials in wp-config.php above the line that says /* That's all, stop editing! */:

define( 'WPSPM_SMTP_USERNAME', 'wordpress@example.org' );
define( 'WPSPM_SMTP_TOKEN', 'replace-with-the-generated-smtp-token' );

When these constants are present, they take priority over database settings and cannot be changed in WordPress administration.

If the token is stored through the settings screen, it is encrypted with Sodium or AES-256-GCM using key material derived from the WordPress authentication salt. Changing the site's authentication keys and salts makes the stored token unreadable; enter the token again afterwards.

Deliverability

Configure the SPF, DKIM and DMARC records shown by Proton for the custom domain. DNS authentication and the reputation of the content and recipient list all affect delivery. A successful plugin test means Proton accepted the message for delivery; it does not guarantee inbox placement.

Hosting restrictions

Some hosting providers block outbound SMTP ports. This plugin requires port 587; it cannot bypass a hosting-level firewall. Ask the host to allow outbound STARTTLS connections to smtp.protonmail.ch:587 or use an email API provider supported by the host.

Conflicts

Run only one plugin that configures WordPress email transport. Other SMTP plugins or custom phpmailer_init hooks may overwrite these settings. This plugin runs its mailer hook late, but another integration can still conflict.

The plugin affects mail sent through wp_mail(). A plugin that sends email directly through its own API or mail library will bypass it.

Privacy and security

  • No message bodies, subjects or recipients are logged by this plugin.
  • The SMTP token is never displayed after it has been saved.
  • Settings changes and test messages require the manage_options capability and WordPress nonces.
  • TLS certificate verification is left enabled.
  • SMTP messages are protected in transit but are not Proton end-to-end encrypted.

Please report vulnerabilities privately as described in SECURITY.md.

Development

Install the development dependencies and run the checks:

composer install
composer check

The project follows the WordPress Coding Standards and is licensed under GPL-2.0-or-later.

Support

Use GitHub Issues for reproducible plugin defects. Questions about account eligibility, SMTP tokens, sending limits or Proton service availability belong with Proton Support. Hosting firewall questions belong with the web host.