WP Manifestindependent plugin directory
manifest / email / sitc-wp-smtp

SITC WP SMTP

WordPress SMTP plugin. Route all outgoing email through your own SMTP server — with an on-page test button that shows you exactly what the server says.

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

Replaces WordPress' default PHP mail() with your own SMTP server. Includes a settings page and a test-email button that reports SMTP server errors.

Description

By default WordPress sends email with the PHP mail() function, which is unreliable and frequently lands in spam. SITC WP SMTP lets you send all outgoing email through your own SMTP server instead.

Features

  • Hook into WordPress' built-in mailer (phpmailer_init) — no mail() calls are ever made once SMTP is enabled.
  • Settings page under Settings → SMTP for host, port, encryption (None/SSL/TLS), username, password, and optional From address/name.
  • Enable/disable toggle. When disabled, WordPress falls back to the default mailer.
  • Send Test Email button that goes through the SMTP configuration shown on the settings page and displays any error reported by the SMTP server directly on the page.
  • Regular (non-test) mail failures are logged with error_log().
  • Clean uninstall: all settings are removed when the plugin is deleted.

Requirements

  • WordPress 5.5 or later
  • PHP 7.2 or later
  • A reachable SMTP server (e.g. Gmail SMTP, SendGrid, your hosting provider's relay)

Installation

  1. Upload the sitc-wp-smtp folder to the /wp-content/plugins/ directory, or install the plugin through the WordPress Plugins → Add New screen.
  2. Activate the plugin through the Plugins screen.
  3. Go to Settings → SMTP and enter your SMTP server details (host, port, encryption, username, password).
  4. Use the Send Test Email button to verify the configuration — it works even before you enable SMTP.
  5. Tick the Enable SMTP checkbox and click Save Settings.

Frequently Asked Questions

How do I know my SMTP settings are correct?

Use the Send Test Email button on the settings page. It sends a message through the SMTP configuration currently shown on the page and shows any error returned by the server (authentication failures, connection problems, etc.).

The test email fails with "Invalid address: (From): wordpress@localhost".

This happens on sites whose domain has no dot (e.g. a local development site at http://localhost). WordPress builds the default From address as wordpress@localhost, which fails address validation, and it does so before plugins can change it via phpmailer_init. SITC WP SMTP fixes this by replacing the From address through the wp_mail_from / wp_mail_from_name filters, which run before validation. Enter a valid From email (e.g. no-reply@example.com) on the settings page and the test should pass.

Does the test email respect the enable checkbox?

No — the test always uses the SMTP settings currently shown on the settings page (saved values are used if you haven't changed anything), so you can verify credentials before switching the plugin on.

The test email fails. What else should I check?

Verify the host and port are correct for your provider, the encryption type matches (TLS usually uses port 587, SSL port 465), and the username/password are valid. Many providers require an app-specific password rather than your regular account password.

What happens if SMTP is enabled but misconfigured?

WordPress falls back to the default mailer and a warning is shown on the settings page. Failures of regular emails are logged to the PHP error log with error_log().

Where are the settings stored?

In the sitc_smtp_settings option in the wp_options table. The password is stored in plaintext, as is common for SMTP plugins; protect the site and database accordingly.

Changelog

1.0.1

  • Fix: From address is now applied via the wp_mail_from / wp_mail_from_name filters, which run before PHPMailer validates it. Previously, on sites with a single-label domain (e.g. localhost) the default wordpress@localhost From address caused "Invalid address: (From)" errors before the plugin could override it.
  • Fix: the test email now uses the SMTP settings currently shown on the settings page, so unsaved changes are tested as well.

1.0.0

  • Initial release.
  • Replace mail() with user-provided SMTP via phpmailer_init.
  • Settings page with enable toggle, server details, and optional From address.
  • Test-email button with on-screen SMTP error reporting.
  • error_log() logging for regular mail failures.
  • Clean uninstall handler.