Version Description
Download this release
Release Info
Developer | sudar |
Plugin | Email Log |
Version | 1.7.3 |
Comparing to | |
See all releases |
Code changes from version 1.7.2 to 1.7.3
- email-log.php +17 -6
- languages/email-log.pot +3 -3
- readme.txt +12 -3
email-log.php
CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://sudarmuthu.com/wordpress/email-log
|
|
5 |
Description: Logs every email sent through WordPress
|
6 |
Donate Link: http://sudarmuthu.com/if-you-wanna-thank-me
|
7 |
Author: Sudar
|
8 |
-
Version: 1.7.
|
9 |
Author URI: http://sudarmuthu.com/
|
10 |
Text Domain: email-log
|
11 |
Domain Path: languages/
|
@@ -307,14 +307,13 @@ class EmailLog {
|
|
307 |
}
|
308 |
|
309 |
/**
|
310 |
-
* Log
|
311 |
*
|
312 |
* @global object $wpdb
|
313 |
-
* @param
|
314 |
-
* @return array
|
315 |
*/
|
316 |
function log_email($mail_info) {
|
317 |
-
|
318 |
global $wpdb;
|
319 |
|
320 |
$attachment_present = (count ($mail_info['attachments']) > 0) ? "true" : "false";
|
@@ -323,11 +322,23 @@ class EmailLog {
|
|
323 |
$mail_info = apply_filters(self::FILTER_NAME, $mail_info);
|
324 |
$table_name = $wpdb->prefix . self::TABLE_NAME;
|
325 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
326 |
// Log into the database
|
327 |
$wpdb->insert( $table_name, array(
|
328 |
'to_email' => is_array($mail_info['to']) ? $mail_info['to'][0] : $mail_info['to'],
|
329 |
'subject' => $mail_info['subject'],
|
330 |
-
'message' => $
|
331 |
'headers' => is_array($mail_info['headers']) ? implode("\n", $mail_info['headers']) : $mail_info['headers'],
|
332 |
'attachments' => $attachment_present,
|
333 |
'sent_date' => current_time('mysql')
|
5 |
Description: Logs every email sent through WordPress
|
6 |
Donate Link: http://sudarmuthu.com/if-you-wanna-thank-me
|
7 |
Author: Sudar
|
8 |
+
Version: 1.7.3
|
9 |
Author URI: http://sudarmuthu.com/
|
10 |
Text Domain: email-log
|
11 |
Domain Path: languages/
|
307 |
}
|
308 |
|
309 |
/**
|
310 |
+
* Log email to database
|
311 |
*
|
312 |
* @global object $wpdb
|
313 |
+
* @param array $mail_info Information about email
|
314 |
+
* @return array Information about email
|
315 |
*/
|
316 |
function log_email($mail_info) {
|
|
|
317 |
global $wpdb;
|
318 |
|
319 |
$attachment_present = (count ($mail_info['attachments']) > 0) ? "true" : "false";
|
322 |
$mail_info = apply_filters(self::FILTER_NAME, $mail_info);
|
323 |
$table_name = $wpdb->prefix . self::TABLE_NAME;
|
324 |
|
325 |
+
if ( isset( $mail_info['message'] ) ) {
|
326 |
+
$message = $mail_info['message'];
|
327 |
+
} else {
|
328 |
+
// wpmandrill plugin is changing "message" key to "html". See https://github.com/sudar/email-log/issues/20
|
329 |
+
// Ideally this should be fixed in wpmandrill, but I am including this hack here till it is fixed by them.
|
330 |
+
if ( isset( $mail_info['html'] ) ) {
|
331 |
+
$message = $mail_info['html'];
|
332 |
+
} else {
|
333 |
+
$message = '';
|
334 |
+
}
|
335 |
+
}
|
336 |
+
|
337 |
// Log into the database
|
338 |
$wpdb->insert( $table_name, array(
|
339 |
'to_email' => is_array($mail_info['to']) ? $mail_info['to'][0] : $mail_info['to'],
|
340 |
'subject' => $mail_info['subject'],
|
341 |
+
'message' => $message,
|
342 |
'headers' => is_array($mail_info['headers']) ? implode("\n", $mail_info['headers']) : $mail_info['headers'],
|
343 |
'attachments' => $attachment_present,
|
344 |
'sent_date' => current_time('mysql')
|
languages/email-log.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the same license as the Email Log package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: Email Log 1.7.
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/email-log\n"
|
7 |
-
"POT-Creation-Date: 2014-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -16,7 +16,7 @@ msgstr ""
|
|
16 |
msgid "Buy Addons"
|
17 |
msgstr ""
|
18 |
|
19 |
-
#. #-#-#-#-# email-log.pot (Email Log 1.7.
|
20 |
#. Plugin Name of the plugin/theme
|
21 |
#: email-log.php:110
|
22 |
msgid "Email Log"
|
2 |
# This file is distributed under the same license as the Email Log package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: Email Log 1.7.3\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/email-log\n"
|
7 |
+
"POT-Creation-Date: 2014-05-14 05:41:56+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
16 |
msgid "Buy Addons"
|
17 |
msgstr ""
|
18 |
|
19 |
+
#. #-#-#-#-# email-log.pot (Email Log 1.7.3) #-#-#-#-#
|
20 |
#. Plugin Name of the plugin/theme
|
21 |
#: email-log.php:110
|
22 |
msgid "Email Log"
|
readme.txt
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
=== Email Log ===
|
2 |
Contributors: sudar
|
3 |
-
Tags: email,
|
4 |
Requires at least: 3.3
|
5 |
-
Tested up to: 3.
|
6 |
-
Stable tag: 1.7.
|
7 |
|
8 |
Logs every email sent through WordPress. Works with WordPress Multisite as well
|
9 |
|
@@ -95,6 +95,12 @@ The pot file is available with the Plugin. If you are willing to do translation
|
|
95 |
|
96 |
Extract the zip file and just drop the contents in the wp-content/plugins/ directory of your WordPress installation and then activate the Plugin from Plugins page.
|
97 |
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
== Screenshots ==
|
99 |
|
100 |
1. The above screenshot shows how the logged emails will be displayed by the Plugin
|
@@ -112,6 +118,9 @@ Extract the zip file and just drop the contents in the wp-content/plugins/ direc
|
|
112 |
This Readme file was generated using <a href = 'http://sudarmuthu.com/wordpress/wp-readme'>wp-readme</a>, which generates readme files for WordPress Plugins.
|
113 |
== Changelog ==
|
114 |
|
|
|
|
|
|
|
115 |
= v1.7.2 (2014-04-16) - (Dev time: 0.5 hours) =
|
116 |
- Fix: Fix issue in register_activation_hook
|
117 |
|
1 |
=== Email Log ===
|
2 |
Contributors: sudar
|
3 |
+
Tags: email, log, multisite
|
4 |
Requires at least: 3.3
|
5 |
+
Tested up to: 3.9.1
|
6 |
+
Stable tag: 1.7.3
|
7 |
|
8 |
Logs every email sent through WordPress. Works with WordPress Multisite as well
|
9 |
|
95 |
|
96 |
Extract the zip file and just drop the contents in the wp-content/plugins/ directory of your WordPress installation and then activate the Plugin from Plugins page.
|
97 |
|
98 |
+
== Frequently Asked Questions ==
|
99 |
+
|
100 |
+
### The content of the email is not getting logged when I am using wpmandrill plugin
|
101 |
+
|
102 |
+
wpmandrill plugin has a bug that prevents this plugin from logging the content of the email. More details about the bug is available at http://wordpress.org/support/topic/mandrill-is-changing-the-names-of-args-in-the-filter?replies=1. I have asked the author of the plugin to fix it and it might get fixed it the next release. Meanwhile, I have added a hack to handle this condition in v1.7.3 of my plugin. So if the content is not getting logged, then upgrade to v1.7.3.
|
103 |
+
|
104 |
== Screenshots ==
|
105 |
|
106 |
1. The above screenshot shows how the logged emails will be displayed by the Plugin
|
118 |
This Readme file was generated using <a href = 'http://sudarmuthu.com/wordpress/wp-readme'>wp-readme</a>, which generates readme files for WordPress Plugins.
|
119 |
== Changelog ==
|
120 |
|
121 |
+
= v1.7.3 (2014-05-14) - (Dev time: 0.5 hours) =
|
122 |
+
- Fix: Fixed a compatibility issue with wpmandrill plugin (issue #20)
|
123 |
+
|
124 |
= v1.7.2 (2014-04-16) - (Dev time: 0.5 hours) =
|
125 |
- Fix: Fix issue in register_activation_hook
|
126 |
|