Coder Social home page Coder Social logo

global-smtp's Introduction

Global SMTP

Global SMTP is a utility plugin designed to easily configure SMTP for WordPress by adding a set of constants to your wp-config.php file.

When used with multisite, the configuration is applied network wide. This is often handy to install as a "must use" plugin.

Getting started

First install as a WordPress pluing. Optionally, you could install as a "must use" plugin by placing smtp.php in wp-content/mu-plugins.

Once the plugin is installing installed, add the constants to wp-config.php

The minimum requirement is setting the host, username, and password. Everything else will be assumed from some defaults.

define('GLOBAL_SMTP_HOST','mail.example.com');
define('GLOBAL_SMTP_USER','[email protected]');
define('GLOBAL_SMTP_PASSWORD','password');

Assumed defaults:

  • From and From Name: WordPress defaults (or possibly overriden by your mail server)
  • Port -> 587
  • Secure -> tls

You can specify your own with these statements:

define('GLOBAL_SMTP_FROM','[email protected]');
define('GLOBAL_SMTP_FROM_NAME','Your Name');
define('GLOBAL_SMTP_PORT',465); // use SSL
define('GLOBAL_SMTP_SECURE;','ssl');

You can also specify some other values for the SMTP mailer:

GLOBAL_SMTP_RETURN_PATH - Bounce address GLOBAL_SMTP_REPLYTO_FROM - Email address for client side replies GLOBAL_SMTP_REPLYTO_FROM_NAME - Name for client side replies

GLOBAL_SMTP_AUTH_TYPE - Can be 'LOGIN', 'PLAIN', 'NTLM' (defaults to 'LOGIN')

Environment Specific Settings

Because all the configuration happens via PHP constants, you can have different configurations depending on what kind of server environment is being used. For example, you could set up staging email addresses, and have your staging environment isolated from the production environment.

define('GLOBAL_SMTP_DISABLE',true);

That will prevent Global SMTP from initializing at all; quite useful for development environments.

Debugging

This plugin will trigger warnings if you've done something wrong. Just be sure to have WP_DEBUG enabled.

You can turn on SMTP debug by including this statement:

define('GLOBAL_SMTP_DEBUG',true);

This will display debug output from the PHP Mailer class when combined with the http://wordpress.org/plugins/check-email/ plugin. This allows you to send a test message and troubleshoot any connectivity problems.

Have any ideas for improvement? Pull requests are welcome! :)

global-smtp's People

Contributors

rohmann avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.