WP Mail Logging - Version 1.6.2

Version Description

  • Fix: search mails

=

Download this release

Release Info

Developer No3x
Plugin Icon 128x128 WP Mail Logging
Version 1.6.2
Comparing to
See all releases

Code changes from version 1.6.1 to 1.6.2

Files changed (3) hide show
  1. model/WPML_Mail.php +79 -79
  2. readme.txt +108 -108
  3. wp-mail-logging.php +112 -112
model/WPML_Mail.php CHANGED
@@ -15,83 +15,83 @@ if(!defined( 'ABSPATH' )) exit;
15
  */
16
  class WPML_Mail extends BaseModel
17
  {
18
- /**
19
- * @var integer
20
- */
21
- protected $mail_id;
22
-
23
- /**
24
- * @var DateTime
25
- */
26
- protected $timestamp;
27
-
28
- /**
29
- * @var string
30
- */
31
- protected $receiver;
32
-
33
- /**
34
- * @var string
35
- */
36
- protected $subject;
37
-
38
- /**
39
- * @var string
40
- */
41
- protected $message;
42
-
43
- /**
44
- * @var string
45
- */
46
- protected $headers;
47
-
48
- /**
49
- * @var string
50
- */
51
- protected $attachments;
52
-
53
- /**
54
- * @var string
55
- */
56
- protected $plugin_version;
57
-
58
- /**
59
- * @var string
60
- */
61
-
62
- public function __construct(array $properties = array())
63
- {
64
- parent::__construct($properties);
65
- }
66
-
67
- /**
68
- * Get the model's primary key.
69
- *
70
- * @return string
71
- */
72
- public static function get_primary_key()
73
- {
74
- return 'mail_id';
75
- }
76
-
77
- /**
78
- * Get the table used to store posts.
79
- *
80
- * @return string
81
- */
82
- public static function get_table()
83
- {
84
- global $wpdb;
85
- return $wpdb->prefix . 'wpml_mails';
86
- }
87
-
88
- /**
89
- * Get an array of properties to search when doing a search query.
90
- *
91
- * @return array
92
- */
93
- public static function get_searchable_fields()
94
- {
95
- return array('receiver', 'subject', 'headers', 'attachments');
96
- }
97
  }
15
  */
16
  class WPML_Mail extends BaseModel
17
  {
18
+ /**
19
+ * @var integer
20
+ */
21
+ protected $mail_id;
22
+
23
+ /**
24
+ * @var DateTime
25
+ */
26
+ protected $timestamp;
27
+
28
+ /**
29
+ * @var string
30
+ */
31
+ protected $receiver;
32
+
33
+ /**
34
+ * @var string
35
+ */
36
+ protected $subject;
37
+
38
+ /**
39
+ * @var string
40
+ */
41
+ protected $message;
42
+
43
+ /**
44
+ * @var string
45
+ */
46
+ protected $headers;
47
+
48
+ /**
49
+ * @var string
50
+ */
51
+ protected $attachments;
52
+
53
+ /**
54
+ * @var string
55
+ */
56
+ protected $plugin_version;
57
+
58
+ /**
59
+ * @var string
60
+ */
61
+
62
+ public function __construct(array $properties = array())
63
+ {
64
+ parent::__construct($properties);
65
+ }
66
+
67
+ /**
68
+ * Get the model's primary key.
69
+ *
70
+ * @return string
71
+ */
72
+ public static function get_primary_key()
73
+ {
74
+ return 'mail_id';
75
+ }
76
+
77
+ /**
78
+ * Get the table used to store posts.
79
+ *
80
+ * @return string
81
+ */
82
+ public static function get_table()
83
+ {
84
+ global $wpdb;
85
+ return $wpdb->prefix . 'wpml_mails';
86
+ }
87
+
88
+ /**
89
+ * Get an array of properties to search when doing a search query.
90
+ *
91
+ * @return array
92
+ */
93
+ public static function get_searchable_fields()
94
+ {
95
+ return array('receiver', 'subject', 'headers', 'message', 'attachments');
96
+ }
97
  }
readme.txt CHANGED
@@ -1,108 +1,108 @@
1
- === WP Mail Logging ===
2
- Contributors: No3x, tripflex
3
- Donate link: http://no3x.de/web/donate
4
- Tags: mail, email, log, logging, debug, list, store, collect, view
5
- License: GPLv3
6
- License URI: http://www.gnu.org/licenses/gpl-3.0.html
7
- Requires at least: 3.0
8
- Tested up to: 4.6
9
- Stable tag: 1.6.1
10
-
11
- Logs each email sent by WordPress.
12
-
13
- == Description ==
14
-
15
- Logs each email sent by WordPress. This can be useful if you don't want to lose such mail contents. It can also be useful for debugging purposes while development.
16
-
17
- Features of the plugin include:
18
-
19
- * Complete list of sent mails - view and search through the mails.
20
- * Zero-configuration - just install and enjoy.
21
- * Log rotation - decide which emails you want to keep.
22
- * Developer: Boost your development performance by keeping track of sent mails.
23
- * Developer: Filters are provided to extend the columns.
24
-
25
- [youtube https://www.youtube.com/watch?v=mQK6VPSV2-E]
26
-
27
- **Follow this plugin on [GitHub](https://github.com/No3x/wp-mail-logging)**
28
-
29
- **If you find an issue, let us know in the [Tracker](https://github.com/No3x/wp-mail-logging/issues?state=open)**
30
-
31
- **Provide feedback and suggestions on [enhancements](https://github.com/No3x/wp-mail-logging/issues?direction=desc&labels=Enhancement%2Cenhancement&page=1&sort=created&state=open)**
32
-
33
- == Installation ==
34
- Just install and activate wp-mail-logging. The plugin will do the work for you! You can list all logged mails on the plugin site.
35
-
36
-
37
- == Frequently Asked Questions ==
38
- = How do I know the Mail was delivered? =
39
- The logged email has been sent by WordPress but please note this does NOT mean it has been delivered. With the given functionality of WordPress you can't determine if a mail was sent successfully.
40
-
41
- == Screenshots ==
42
- 1. The List
43
- 2. The Detail View
44
- 3. The Settings
45
-
46
- == Upgrade Notice ==
47
- = 1.6.0 =
48
- - New: Improved modal, added view types
49
- - Tweak: Proper date if none set in WordPress settings
50
- - Tweak: Updated libraries
51
- - Tweak: Added wp_mail hook to very last priority
52
-
53
- == Changelog ==
54
-
55
- = 1.6.1, August 1, 2016 =
56
- - Fix: delete mails
57
-
58
- = 1.6.0, July 31, 2016 =
59
- - New: Improved modal, added view types
60
- - Tweak: Proper date if none set in WordPress settings
61
- - Tweak: Updated libraries
62
- - Tweak: Added wp_mail hook to very last priority
63
-
64
- = 1.5.1, October 11, 2015 =
65
- - Tweak: Fixed security issues
66
-
67
- = 1.5.0, June 4, 2015 =
68
- - New: Setting for date time format
69
- - Tweak: Removed admin bar menu
70
- - Fix: repetitive cron schedule
71
-
72
- = 1.4.2, April 4, 2015 =
73
- - Tweak: Library updated - settings load speed improved.
74
-
75
- = 1.4.1, March 28, 2015 =
76
- - Fix: Restrict submission data works now.
77
- - Fix: Granularity of cleanup by time slider changed to 7.
78
-
79
- = 1.4.0, December 22, 2014 =
80
- - New: Log Rotation
81
- - New: Search
82
- - Tweak: Settings
83
- - Fix: international characters are supported now
84
- - Fix: Mandrill support
85
-
86
- = 1.3.2, September 21, 2014 =
87
- - Fix: HTML mails broken in previous version.
88
-
89
- = 1.3.1, September 12, 2014 =
90
- - Fix: angle brackets notation support (e.g. John Doe <john.doe@example.org>).
91
-
92
- = 1.3, August 24, 2014 =
93
- - New: clean mail listing including:
94
- Modal window for mail details.
95
- Attachment support with appropriate icon for mime type.
96
- - Tweak: Performance improvement
97
- - Fix: screen option for mails per page
98
-
99
- = 1.2, August 12, 2014 =
100
- - New: video
101
- - Tweak: Improved help & stability
102
- - Fix: deletion of mails regardless of options (on update to 1.2 your mails will be deleted hopefully this happens for the last time)
103
-
104
- = 1.1 =
105
- - Tweak: Modified readme.
106
-
107
- = 1.0 =
108
- - Initial Revision
1
+ === WP Mail Logging ===
2
+ Contributors: No3x, tripflex
3
+ Donate link: http://no3x.de/web/donate
4
+ Tags: mail, email, log, logging, debug, list, store, collect, view
5
+ License: GPLv3
6
+ License URI: http://www.gnu.org/licenses/gpl-3.0.html
7
+ Requires at least: 3.0
8
+ Tested up to: 4.6
9
+ Stable tag: 1.6.2
10
+
11
+ Logs each email sent by WordPress.
12
+
13
+ == Description ==
14
+
15
+ Logs each email sent by WordPress. This can be useful if you don't want to lose such mail contents. It can also be useful for debugging purposes while development.
16
+
17
+ Features of the plugin include:
18
+
19
+ * Complete list of sent mails - view and search through the mails.
20
+ * Zero-configuration - just install and enjoy.
21
+ * Log rotation - decide which emails you want to keep.
22
+ * Developer: Boost your development performance by keeping track of sent mails.
23
+ * Developer: Filters are provided to extend the columns.
24
+
25
+ [youtube https://www.youtube.com/watch?v=mQK6VPSV2-E]
26
+
27
+ **Follow this plugin on [GitHub](https://github.com/No3x/wp-mail-logging)**
28
+
29
+ **If you find an issue, let us know in the [Tracker](https://github.com/No3x/wp-mail-logging/issues?state=open)**
30
+
31
+ **Provide feedback and suggestions on [enhancements](https://github.com/No3x/wp-mail-logging/issues?direction=desc&labels=Enhancement%2Cenhancement&page=1&sort=created&state=open)**
32
+
33
+ == Installation ==
34
+ Just install and activate wp-mail-logging. The plugin will do the work for you! You can list all logged mails on the plugin site.
35
+
36
+
37
+ == Frequently Asked Questions ==
38
+ = How do I know the Mail was delivered? =
39
+ The logged email has been sent by WordPress but please note this does NOT mean it has been delivered. With the given functionality of WordPress you can't determine if a mail was sent successfully.
40
+
41
+ == Screenshots ==
42
+ 1. The List
43
+ 2. The Detail View
44
+ 3. The Settings
45
+
46
+ == Upgrade Notice ==
47
+ = 1.6.2 =
48
+ - Fix: search mails
49
+
50
+ == Changelog ==
51
+
52
+ = 1.6.2, August 7, 2016 =
53
+ - Fix: search mails
54
+
55
+ = 1.6.1, August 1, 2016 =
56
+ - Fix: delete mails
57
+
58
+ = 1.6.0, July 31, 2016 =
59
+ - New: Improved modal, added view types
60
+ - Tweak: Proper date if none set in WordPress settings
61
+ - Tweak: Updated libraries
62
+ - Tweak: Added wp_mail hook to very last priority
63
+
64
+ = 1.5.1, October 11, 2015 =
65
+ - Tweak: Fixed security issues
66
+
67
+ = 1.5.0, June 4, 2015 =
68
+ - New: Setting for date time format
69
+ - Tweak: Removed admin bar menu
70
+ - Fix: repetitive cron schedule
71
+
72
+ = 1.4.2, April 4, 2015 =
73
+ - Tweak: Library updated - settings load speed improved.
74
+
75
+ = 1.4.1, March 28, 2015 =
76
+ - Fix: Restrict submission data works now.
77
+ - Fix: Granularity of cleanup by time slider changed to 7.
78
+
79
+ = 1.4.0, December 22, 2014 =
80
+ - New: Log Rotation
81
+ - New: Search
82
+ - Tweak: Settings
83
+ - Fix: international characters are supported now
84
+ - Fix: Mandrill support
85
+
86
+ = 1.3.2, September 21, 2014 =
87
+ - Fix: HTML mails broken in previous version.
88
+
89
+ = 1.3.1, September 12, 2014 =
90
+ - Fix: angle brackets notation support (e.g. John Doe <john.doe@example.org>).
91
+
92
+ = 1.3, August 24, 2014 =
93
+ - New: clean mail listing including:
94
+ Modal window for mail details.
95
+ Attachment support with appropriate icon for mime type.
96
+ - Tweak: Performance improvement
97
+ - Fix: screen option for mails per page
98
+
99
+ = 1.2, August 12, 2014 =
100
+ - New: video
101
+ - Tweak: Improved help & stability
102
+ - Fix: deletion of mails regardless of options (on update to 1.2 your mails will be deleted hopefully this happens for the last time)
103
+
104
+ = 1.1 =
105
+ - Tweak: Modified readme.
106
+
107
+ = 1.0 =
108
+ - Initial Revision
wp-mail-logging.php CHANGED
@@ -1,112 +1,112 @@
1
- <?php
2
- /*
3
- Plugin Name: WP Mail Logging
4
- Plugin URI: http://wordpress.org/extend/plugins/wp-mail-logging/
5
- Support URI: https://github.com/No3x/wp-mail-logging/issues
6
- Version: 1.6.1
7
- Author: Christian Z&ouml;ller
8
- Author URI: http://no3x.de/
9
- Description: Logs each email sent by WordPress.
10
- Text Domain: wpml
11
- License: GPLv3
12
- */
13
-
14
- /*
15
- "WordPress Plugin Template" Copyright (C) 2013 Michael Simpson (email : michael.d.simpson@gmail.com)
16
-
17
- This following part of this file is part of WordPress Plugin Template for WordPress.
18
-
19
- WordPress Plugin Template is free software: you can redistribute it and/or modify
20
- it under the terms of the GNU General Public License as published by
21
- the Free Software Foundation, either version 3 of the License, or
22
- (at your option) any later version.
23
-
24
- WordPress Plugin Template is distributed in the hope that it will be useful,
25
- but WITHOUT ANY WARRANTY; without even the implied warranty of
26
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27
- GNU General Public License for more details.
28
-
29
- You should have received a copy of the GNU General Public License
30
- along with Contact Form to Database Extension.
31
- If not, see http://www.gnu.org/licenses/gpl-3.0.html
32
- */
33
-
34
- namespace No3x\WPML;
35
-
36
- use No3x\WPML\WPML_Init;
37
-
38
- // Exit if accessed directly.
39
- if ( ! defined( 'ABSPATH' ) ) exit;
40
-
41
- $WPML_minimalRequiredPhpVersion = '5.4';
42
-
43
- /**
44
- * Check the PHP version and give a useful error message if the user's version is less than the required version
45
- * @return boolean true if version check passed. If false, triggers an error which WP will handle, by displaying
46
- * an error message on the Admin page
47
- */
48
- function WPML_noticePhpVersionWrong() {
49
- global $WPML_minimalRequiredPhpVersion;
50
- echo '<div class="error">' .
51
- __( 'Error: plugin "WP Mail Logging" requires a newer version of PHP to be running.', 'wpml' ).
52
- '<br/>' . __( 'Minimal version of PHP required: ', 'wpml' ) . '<strong>' . $WPML_minimalRequiredPhpVersion . '</strong>' .
53
- '<br/>' . __( 'Your server\'s PHP version: ', 'wpml' ) . '<strong>' . phpversion() . '</strong>' .
54
- '</div>';
55
- }
56
-
57
-
58
- function WPML_PhpVersionCheck() {
59
- global $WPML_minimalRequiredPhpVersion;
60
- if ( version_compare( phpversion(), $WPML_minimalRequiredPhpVersion ) < 0 ) {
61
- add_action( 'admin_notices', __NAMESPACE__ . '\WPML_noticePhpVersionWrong' );
62
- return false;
63
- }
64
- return true;
65
- }
66
-
67
-
68
- /**
69
- * Initialize internationalization (i18n) for this plugin.
70
- * References:
71
- * http://codex.wordpress.org/I18n_for_WordPress_Developers
72
- * http://www.wdmac.com/how-to-create-a-po-language-translation#more-631
73
- * @return void
74
- */
75
- function WPML_i18n_init() {
76
- $pluginDir = dirname(plugin_basename(__FILE__));
77
- load_plugin_textdomain('wpml', false, $pluginDir . '/languages/');
78
- }
79
-
80
-
81
- //////////////////////////////////
82
- // Run initialization
83
- /////////////////////////////////
84
-
85
- // First initialize i18n
86
- WPML_i18n_init();
87
-
88
-
89
- // Next, run the version check.
90
- // If it is successful, continue with initialization for this plugin
91
- if (WPML_PhpVersionCheck()) {
92
- // Only init and run the init function if we know PHP version can parse it
93
- require __DIR__ . '/autoload.php';
94
-
95
- // Create a new instance of the autoloader
96
- $loader = new \WPML_Psr4AutoloaderClass();
97
-
98
- // Register this instance
99
- $loader->register();
100
-
101
- // Add our namespace and the folder it maps to
102
- require_once __DIR__ . '/inc/redux/admin-init.php';
103
- $loader->addNamespace('No3x\\WPML\\', __DIR__ );
104
- $loader->addNamespace('No3x\\WPML\\Model\\', __DIR__ . '/model' );
105
- $loader->addNamespace('No3x\\WPML\\Settings\\', __DIR__ . '/inc/redux');
106
- $loader->addNamespace('No3x\\WPML\\ORM\\', __DIR__ . '/lib/vendor/brandonwamboldt/wp-orm/src');
107
- $loader->addNamespace('No3x\\WPML\\Pimple\\', __DIR__ . '/lib/vendor/pimple/pimple/src');
108
- if( file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
109
- require_once __DIR__ . '/vendor/autoload.php';
110
- }
111
- WPML_Init::getInstance()->init( __FILE__ );
112
- }
1
+ <?php
2
+ /*
3
+ Plugin Name: WP Mail Logging
4
+ Plugin URI: http://wordpress.org/extend/plugins/wp-mail-logging/
5
+ Support URI: https://github.com/No3x/wp-mail-logging/issues
6
+ Version: 1.6.2
7
+ Author: Christian Z&ouml;ller
8
+ Author URI: http://no3x.de/
9
+ Description: Logs each email sent by WordPress.
10
+ Text Domain: wpml
11
+ License: GPLv3
12
+ */
13
+
14
+ /*
15
+ "WordPress Plugin Template" Copyright (C) 2013 Michael Simpson (email : michael.d.simpson@gmail.com)
16
+
17
+ This following part of this file is part of WordPress Plugin Template for WordPress.
18
+
19
+ WordPress Plugin Template is free software: you can redistribute it and/or modify
20
+ it under the terms of the GNU General Public License as published by
21
+ the Free Software Foundation, either version 3 of the License, or
22
+ (at your option) any later version.
23
+
24
+ WordPress Plugin Template is distributed in the hope that it will be useful,
25
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
26
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27
+ GNU General Public License for more details.
28
+
29
+ You should have received a copy of the GNU General Public License
30
+ along with Contact Form to Database Extension.
31
+ If not, see http://www.gnu.org/licenses/gpl-3.0.html
32
+ */
33
+
34
+ namespace No3x\WPML;
35
+
36
+ use No3x\WPML\WPML_Init;
37
+
38
+ // Exit if accessed directly.
39
+ if ( ! defined( 'ABSPATH' ) ) exit;
40
+
41
+ $WPML_minimalRequiredPhpVersion = '5.4';
42
+
43
+ /**
44
+ * Check the PHP version and give a useful error message if the user's version is less than the required version
45
+ * @return boolean true if version check passed. If false, triggers an error which WP will handle, by displaying
46
+ * an error message on the Admin page
47
+ */
48
+ function WPML_noticePhpVersionWrong() {
49
+ global $WPML_minimalRequiredPhpVersion;
50
+ echo '<div class="error">' .
51
+ __( 'Error: plugin "WP Mail Logging" requires a newer version of PHP to be running.', 'wpml' ).
52
+ '<br/>' . __( 'Minimal version of PHP required: ', 'wpml' ) . '<strong>' . $WPML_minimalRequiredPhpVersion . '</strong>' .
53
+ '<br/>' . __( 'Your server\'s PHP version: ', 'wpml' ) . '<strong>' . phpversion() . '</strong>' .
54
+ '</div>';
55
+ }
56
+
57
+
58
+ function WPML_PhpVersionCheck() {
59
+ global $WPML_minimalRequiredPhpVersion;
60
+ if ( version_compare( phpversion(), $WPML_minimalRequiredPhpVersion ) < 0 ) {
61
+ add_action( 'admin_notices', __NAMESPACE__ . '\WPML_noticePhpVersionWrong' );
62
+ return false;
63
+ }
64
+ return true;
65
+ }
66
+
67
+
68
+ /**
69
+ * Initialize internationalization (i18n) for this plugin.
70
+ * References:
71
+ * http://codex.wordpress.org/I18n_for_WordPress_Developers
72
+ * http://www.wdmac.com/how-to-create-a-po-language-translation#more-631
73
+ * @return void
74
+ */
75
+ function WPML_i18n_init() {
76
+ $pluginDir = dirname(plugin_basename(__FILE__));
77
+ load_plugin_textdomain('wpml', false, $pluginDir . '/languages/');
78
+ }
79
+
80
+
81
+ //////////////////////////////////
82
+ // Run initialization
83
+ /////////////////////////////////
84
+
85
+ // First initialize i18n
86
+ WPML_i18n_init();
87
+
88
+
89
+ // Next, run the version check.
90
+ // If it is successful, continue with initialization for this plugin
91
+ if (WPML_PhpVersionCheck()) {
92
+ // Only init and run the init function if we know PHP version can parse it
93
+ require __DIR__ . '/autoload.php';
94
+
95
+ // Create a new instance of the autoloader
96
+ $loader = new \WPML_Psr4AutoloaderClass();
97
+
98
+ // Register this instance
99
+ $loader->register();
100
+
101
+ // Add our namespace and the folder it maps to
102
+ require_once __DIR__ . '/inc/redux/admin-init.php';
103
+ $loader->addNamespace('No3x\\WPML\\', __DIR__ );
104
+ $loader->addNamespace('No3x\\WPML\\Model\\', __DIR__ . '/model' );
105
+ $loader->addNamespace('No3x\\WPML\\Settings\\', __DIR__ . '/inc/redux');
106
+ $loader->addNamespace('No3x\\WPML\\ORM\\', __DIR__ . '/lib/vendor/brandonwamboldt/wp-orm/src');
107
+ $loader->addNamespace('No3x\\WPML\\Pimple\\', __DIR__ . '/lib/vendor/pimple/pimple/src');
108
+ if( file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
109
+ require_once __DIR__ . '/vendor/autoload.php';
110
+ }
111
+ WPML_Init::getInstance()->init( __FILE__ );
112
+ }