Skip to content

Instantly share code, notes, and snippets.

@mitchelldmiller
Created January 11, 2021 02:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mitchelldmiller/8a906fc03e5a548e9cf5d0c7bc0854b7 to your computer and use it in GitHub Desktop.
Save mitchelldmiller/8a906fc03e5a548e9cf5d0c7bc0854b7 to your computer and use it in GitHub Desktop.
Check for a banned domain from a standalone page.
<?php
/**
* Example of checking for a banned domain from a standalone page.
* Requires Quick Mail plugin version 4.0.5 or greater.
*/
require_once($_SERVER['DOCUMENT_ROOT'] . '/wp-load.php');
$domain = empty($_GET['domain']) ? 'example.com' : $_GET['domain'];
$desc = empty(QuickMailUtil::acceptable_domain($domain)) ? 'BANNED' : 'OK';
wp_die("{$domain} = {$desc}", $domain);
exit;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment