WP Manifestindependent plugin directory
manifest / email / wordpress-mailer-dsn

Mailer DSN WP Registry grade A-. Low-severity findings · 1 findingWP RegistryLow-severity findings · 1 findingOpen the reportA-

WordPress plugin to configure wp_mail() via MAILER_DSN environment variable

★ 3stars
v1.0.1latest · 2 years ago

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/popartdesign/wordpress-mailer-dsn/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.

WordPress Mailer DSN (Data Source Name)

WordPress plugin to configure wp_mail() via MAILER_DSN environment variable.

Installation

Use the Composer:

composer require popartdesign/wordpress-mailer-dsn

Don't forget to activate the plugin, if you don't use the mu-plugins directory.

Define (in your .env file for example) the MAILER_DSN variable like this:

MAILER_DSN='mail://localhost'

Configuraton

Supported protocols:

  • mail
  • sendmail
  • qmail
  • smtp
  • smtps

Additional configuration could be applied via query string:

MAILER_DSN='mail://localhost?XMailer=SuperMailer&FromName=CoolSite'

PHPMailer configured by public properties, so you can use any of them. All allowed options could be found at PHPMailer Docs.

Examples

Sendmail

MAILER_DSN='sendmail://localhost?Sendmail=/usr/sbin/sendmail%20-oi%20-t'

SMTP

MAILER_DSN='smtp://user:password@localhost?SMTPDebug=3&Timeout=1000'

Gmail

MAILER_DSN='smtps://user@gmail.com:password@smtp.gmail.com:587'

Advanced

Sometimes it's not convinient to configure all options by the only one MAILER_DSN variable. For example, if you want to configure DKIM, you will end with very long unreadable DSN string. In this cases you can use one of MAILER_* variables:

  • MAILER_DEBUG
  • MAILER_DEBUG_OUTPUT
  • MAILER_FROM
  • MAILER_FROM_NAME
  • MAILER_SENDER
  • MAILER_DKIM_PRIVATE
  • MAILER_DKIM_PASSPHRASE
  • MAILER_DKIM_SELECTOR
  • MAILER_DKIM_IDENTITY
  • MAILER_DKIM_DOMAIN
  • and etc.

See source code for all available vars.

License

Copyright (c) Voronkovich Oleg. Distributed under the MIT.

Releases

10 releases.

Tag
Published
v1.0.1 latest
Sep 10, 2024 2 years ago
May 9, 2023 3 years ago
May 7, 2023 3 years ago
May 6, 2023 3 years ago
May 6, 2023 3 years ago
Mar 12, 2023 3 years ago
Feb 27, 2023 3 years ago
Feb 20, 2023 3 years ago
Feb 20, 2023 3 years ago
Feb 19, 2023 3 years ago

These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.

A- grade

Security

Mailer DSN 1.0.0 · audited by WP Registry

Low-severity findings only.

1 low
Audited release
1.0.0
Findings
1
Worst severity
low
Content hash
c45c87857164e640f7cc77bd…

Findings

  • low Version mismatch between slug and header

    version_mismatch

    Slug is wordpress-mailer-dsn-1.0.1 but header Version is 1.0.0.

    mailerdsn.php:1-20

    Recommendation

    Align versions.

WP Registry hashes the installable build and reports on that exact bytes-for-bytes copy. Embargoed findings are withheld until they are disclosed, so a clean verdict means nothing public is outstanding. WP Manifest does not audit code itself.