SMTP

By WordPress.org

★ 2.5/5 (4 ratings)600+ active installationsVersion 1.2.0

Send WordPress emails through an SMTP server, with an extensible provider API and a simple email log.

Description

SMTP is a minimal, community-maintained plugin that sends the emails of your site through the SMTP server of your choice.

  • Simple settings: host, port, encryption, authentication, From email and From name under Tools > SMTP.
  • Constants support: define SMTP_HOST, SMTP_PORT, SMTP_ENCRYPTION, SMTP_USER, SMTP_PASSWORD and SMTP_FROM_EMAIL in wp-config.php to override the saved values. Recommended for production, so credentials stay out of the database.
  • Email log: every email sent with wp_mail() is logged with its recipient, subject, status and error. The message body and attachments are never stored. Entries are deleted after 30 days.
  • Alerts: get a Slack message when an email fails to send, so a broken mailer does not go unnoticed. Developers can add more channels.
  • Test email: send a test message to yourself and see the connection log and a hint on what to check if something goes wrong. Credentials are redacted.
  • WP-CLI: configure the plugin, send a test email and check the status from the command line.
  • Extensible: developers can add more providers. See the technical documentation on GitHub.

The plugin does nothing until a host is configured, so activating it never breaks your site’s email.

Contributing

SMTP is developed in the open. Bug reports, ideas and pull requests are welcome at github.com/wordpress/smtp.

Installation

  1. Upload the plugin to the /wp-content/plugins/ directory, or install it from the Plugins screen.
  2. Activate the plugin.
  3. Go to Tools > SMTP and enter your SMTP server details.
  4. Use the Test tab to send yourself an email.

FAQ

Where are my credentials stored?

Passwords can be defined with the SMTP_PASSWORD constant in wp-config.php. Otherwise they are stored in the database, in an option that is not loaded on every request.

I was using the previous SMTP plugin. Do I lose my settings?

No. When this version loads for the first time it imports your host, port, encryption, username and password, and keeps sending email as the first user of the site, like before. You will see a notice with a link to review the settings. If your server can no longer decrypt the old password, the notice asks you to enter it again. Your old settings are left untouched.

Does it support providers that use an HTTP API instead of SMTP?

Not yet. Providers can configure PHPMailer, which covers any service that offers SMTP.

Changelog

1.2.0

  • Initial release, maintained by the WordPress Plugins Team and the community.
  • Settings of the previous SMTP plugin are imported automatically.
  • Alerts tab: get notified on Slack when an email fails to send.
  • With authentication on, mail goes through SMTP only once a username and password are saved. Until then, the default mailer and From address are kept.