Version Description
- 2019-07-11 =
- Added a blacklist for email addresses that should not be receiving any emails.
Download this release
Release Info
Developer | wysija |
Plugin | MailPoet Newsletters (Previous) |
Version | 2.12 |
Comparing to | |
See all releases |
Code changes from version 2.11 to 2.12
- core/base.php +1 -1
- helpers/blacklist.php +23 -0
- helpers/mailer.php +16 -0
- index.php +1 -1
- languages/wysija-newsletters-br.mo +0 -0
- languages/wysija-newsletters-da_DK.mo +0 -0
- readme.txt +5 -2
core/base.php
CHANGED
@@ -19,7 +19,7 @@ class WYSIJA_object{
|
|
19 |
* Static variable holding core MailPoet's version
|
20 |
* @var array
|
21 |
*/
|
22 |
-
static $version = '2.
|
23 |
|
24 |
function __construct(){}
|
25 |
|
19 |
* Static variable holding core MailPoet's version
|
20 |
* @var array
|
21 |
*/
|
22 |
+
static $version = '2.12';
|
23 |
|
24 |
function __construct(){}
|
25 |
|
helpers/blacklist.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Blacklist {
|
4 |
+
const SALT = 'mailpoet';
|
5 |
+
|
6 |
+
private $blacklist = array(
|
7 |
+
'e60c6e0e73997c92d4ceac78a6b6cbbe6249244c4106a3c31de421fc50370ecd' => 1,
|
8 |
+
);
|
9 |
+
|
10 |
+
public function isBlacklisted($email) {
|
11 |
+
$hashed_email = $this->hash($email);
|
12 |
+
return !empty($this->blacklist[$hashed_email]);
|
13 |
+
}
|
14 |
+
|
15 |
+
public function hash($email) {
|
16 |
+
return hash('sha256', $email . self::SALT);
|
17 |
+
}
|
18 |
+
|
19 |
+
public function addEmail($email) {
|
20 |
+
$hashed_email = $this->hash($email);
|
21 |
+
$this->blacklist[$hashed_email] = 1;
|
22 |
+
}
|
23 |
+
}
|
helpers/mailer.php
CHANGED
@@ -6,6 +6,8 @@
|
|
6 |
defined( 'WYSIJA' ) || die( 'Restricted access' );
|
7 |
|
8 |
require_once ABSPATH . WPINC . '/class-phpmailer.php';
|
|
|
|
|
9 |
class WYSIJA_help_mailer extends PHPMailer {
|
10 |
var $report = true;
|
11 |
var $checkConfirmField = true;
|
@@ -33,6 +35,8 @@ class WYSIJA_help_mailer extends PHPMailer {
|
|
33 |
var $listnames = false;
|
34 |
var $is_wp_mail = false;
|
35 |
|
|
|
|
|
36 |
/**
|
37 |
* Change parent properties scope for legacy compatibility
|
38 |
*/
|
@@ -215,6 +219,13 @@ class WYSIJA_help_mailer extends PHPMailer {
|
|
215 |
$this->Mailer = 'wpmail';
|
216 |
}
|
217 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
218 |
function send(){
|
219 |
// prevent user/script details being exposed in X-PHP-Script header
|
220 |
if ( isset( $_SERVER['REMOTE_ADDR'] ) && ! empty( $_SERVER['REMOTE_ADDR'] ) ){
|
@@ -582,6 +593,11 @@ class WYSIJA_help_mailer extends PHPMailer {
|
|
582 |
return false;
|
583 |
}
|
584 |
|
|
|
|
|
|
|
|
|
|
|
585 |
$max_confirmation_emails = apply_filters('wysija_subscription_max_confirmation_emails', 3);
|
586 |
|
587 |
if ($confirmEmail && !is_user_logged_in()) {
|
6 |
defined( 'WYSIJA' ) || die( 'Restricted access' );
|
7 |
|
8 |
require_once ABSPATH . WPINC . '/class-phpmailer.php';
|
9 |
+
require_once dirname(__FILE__) . '/blacklist.php';
|
10 |
+
|
11 |
class WYSIJA_help_mailer extends PHPMailer {
|
12 |
var $report = true;
|
13 |
var $checkConfirmField = true;
|
35 |
var $listnames = false;
|
36 |
var $is_wp_mail = false;
|
37 |
|
38 |
+
private $blacklist;
|
39 |
+
|
40 |
/**
|
41 |
* Change parent properties scope for legacy compatibility
|
42 |
*/
|
219 |
$this->Mailer = 'wpmail';
|
220 |
}
|
221 |
|
222 |
+
function isBlacklisted($email) {
|
223 |
+
if (!$this->blacklist instanceof Blacklist) {
|
224 |
+
$this->blacklist = new Blacklist();
|
225 |
+
}
|
226 |
+
return $this->blacklist->isBlacklisted($email);
|
227 |
+
}
|
228 |
+
|
229 |
function send(){
|
230 |
// prevent user/script details being exposed in X-PHP-Script header
|
231 |
if ( isset( $_SERVER['REMOTE_ADDR'] ) && ! empty( $_SERVER['REMOTE_ADDR'] ) ){
|
593 |
return false;
|
594 |
}
|
595 |
|
596 |
+
if ($this->isBlacklisted($receiver->email)) {
|
597 |
+
$this->core->error(__('The PHP Extension openssl is not enabled on your server. Ask your host to enable it if you want to use an SSL connection.',WYSIJA));
|
598 |
+
return false;
|
599 |
+
}
|
600 |
+
|
601 |
$max_confirmation_emails = apply_filters('wysija_subscription_max_confirmation_emails', 3);
|
602 |
|
603 |
if ($confirmEmail && !is_user_logged_in()) {
|
index.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: MailPoet 2
|
4 |
Plugin URI: http://www.mailpoet.com/
|
5 |
Description: Create and send newsletters or automated emails. Capture subscribers with a widget. Import and manage your lists. This version is being replaced by MailPoet 3. Support offered to Premium customers only. Updates are limited to security issues.
|
6 |
-
Version: 2.
|
7 |
Author: MailPoet
|
8 |
Author URI: http://www.mailpoet.com/
|
9 |
License: GPLv2 or later
|
3 |
Plugin Name: MailPoet 2
|
4 |
Plugin URI: http://www.mailpoet.com/
|
5 |
Description: Create and send newsletters or automated emails. Capture subscribers with a widget. Import and manage your lists. This version is being replaced by MailPoet 3. Support offered to Premium customers only. Updates are limited to security issues.
|
6 |
+
Version: 2.12
|
7 |
Author: MailPoet
|
8 |
Author URI: http://www.mailpoet.com/
|
9 |
License: GPLv2 or later
|
languages/wysija-newsletters-br.mo
ADDED
Binary file
|
languages/wysija-newsletters-da_DK.mo
CHANGED
Binary file
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: wysija
|
3 |
Tags: newsletter, email, welcome email, post notification, autoresponder, signup, subscription, SMTP
|
4 |
Requires at least: 3.5
|
5 |
-
Tested up to:
|
6 |
-
Stable tag: 2.
|
7 |
Send newsletters post notifications or autoresponders from WordPress easily, and beautifully. Start to capture subscribers with our widget now.
|
8 |
|
9 |
== Description ==
|
@@ -113,6 +113,9 @@ Our [support site](https://www.mailpoet.com/support) has plenty of articles and
|
|
113 |
|
114 |
== Changelog ==
|
115 |
|
|
|
|
|
|
|
116 |
= 2.11 - 2019-02-14 =
|
117 |
* Improved: limiting number of "Subscription confirmation" emails sent to prevent abuse.
|
118 |
|
2 |
Contributors: wysija
|
3 |
Tags: newsletter, email, welcome email, post notification, autoresponder, signup, subscription, SMTP
|
4 |
Requires at least: 3.5
|
5 |
+
Tested up to: 5.2
|
6 |
+
Stable tag: 2.12
|
7 |
Send newsletters post notifications or autoresponders from WordPress easily, and beautifully. Start to capture subscribers with our widget now.
|
8 |
|
9 |
== Description ==
|
113 |
|
114 |
== Changelog ==
|
115 |
|
116 |
+
= 2.12 - 2019-07-11 =
|
117 |
+
* Added a blacklist for email addresses that should not be receiving any emails.
|
118 |
+
|
119 |
= 2.11 - 2019-02-14 =
|
120 |
* Improved: limiting number of "Subscription confirmation" emails sent to prevent abuse.
|
121 |
|