Email Log - Version 1.6

Version Description

Ability to view content of the email

Download this release

Release Info

Developer sudar
Plugin Icon 128x128 Email Log
Version 1.6
Comparing to
See all releases

Code changes from version 1.5.4 to 1.6

email-log.php CHANGED
@@ -5,58 +5,15 @@ Plugin URI: http://sudarmuthu.com/wordpress/email-log
5
  Description: Logs every email sent through WordPress. Compatible with WPMU too.
6
  Donate Link: http://sudarmuthu.com/if-you-wanna-thank-me
7
  Author: Sudar
8
- Version: 1.5.4
9
  Author URI: http://sudarmuthu.com/
10
  Text Domain: email-log
11
  Domain Path: languages/
12
 
13
  === RELEASE NOTES ===
14
- 2009-10-08 - v0.1 - Initial Release
15
- 2009-10-15 - v0.2 - Added compatability for MySQL 4
16
- 2009-10-19 - v0.3 - Added compatability for MySQL 4 (Thanks Frank)
17
- 2010-01-02 - v0.4 - Added german translation (Thanks Frank)
18
- 2012-01-01 - v0.5 - Fixed a deprecation notice
19
- 2012-04-29 - v0.6 - (Dev time: 2 hours)
20
- - Added option to delete individual email logs
21
- - Moved pages per screen option to Screen options panel
22
- - Added information to the screen help tab
23
- - Added Lithuanian translations
24
- 2012-06-23 - v0.7 - (Dev time: 1 hour)
25
- - Changed Timestamp(n) MySQL datatype to Timestamp (now compatible with MySQL 5.5+)
26
- - Added the ability to bulk delete checkboxes
27
- 2012-07-12 - v0.8 - (Dev time: 1 hour)
28
- - Fixed undefined notices - http://wordpress.org/support/topic/plugin-email-log-notices-undefined-indices
29
- - Added Dutch translations
30
- 2012-07-23 - v0.8.1 - (Dev time: 0.5 hour)
31
- - Reworded most error messages and fixed lot of typos
32
- 2013-01-08 - v0.9 - (Dev time: 1 hour)
33
- - Use blog date/time for send date instead of server time
34
- - Handle cases where the headers send is an array
35
- 2013-01-08 - v0.9.1 - (Dev time: 0.5 hour)
36
- - Moved the menu under tools (Thanks samuelaguilera)
37
- 2013-03-14 - v0.9.2 - (Dev time: 0.5 hour)
38
- - Added support for filters which can be used while logging emails
39
- 2013-04-01 - v0.9.3 - (Dev time: 0.5 hour)
40
- - Moved table name into a separate constants file
41
- 2013-04-17 - v1.0 - (Dev time: 0.5 hour)
42
- - Added support for buying pro addons
43
- 2013-04-27 - v1.1 - (Dev time: 0.5 hour)
44
- - Added more documentation
45
- 2013-09-09 - v1.5 - (Dev time: 10 hours)
46
- - Rewrote Admin interface using native tables
47
- 2013-09-09 - v1.5.1 - (Dev time: 0.5 hours)
48
- - Correct the upgrade file include path. Issue #7
49
- - Fix undfined notice error. Issue #8
50
- - Update screenshots. Issue #6
51
- 2013-09-13 - v1.5.2 - (Dev time: 0.5 hours)
52
- - Add the ability to override the fields displayed in the log page
53
- - Add support for "More Fields" addon
54
- 2013-09-14 - v1.5.3 - (Dev time: 0.5 hours)
55
- - Fix issue in bulk deleting logs
56
- 2013-09-21 - v1.5.4 - (Dev time: 0.5 hours)
57
- - Fix issue in searching non-english characters
58
- - Add addon screenshots
59
  */
 
60
  /* Copyright 2009 Sudar Muthu (email : sudar@sudarmuthu.com)
61
 
62
  This program is free software; you can redistribute it and/or modify
@@ -116,6 +73,12 @@ class EmailLog {
116
  $plugin = plugin_basename(__FILE__);
117
  add_filter("plugin_action_links_$plugin", array(&$this, 'add_action_links'));
118
 
 
 
 
 
 
 
119
  $this->table_name = $wpdb->prefix . self::TABLE_NAME;
120
  }
121
 
@@ -237,6 +200,56 @@ class EmailLog {
237
  $this->logs_table = new Email_Log_List_Table();
238
  }
239
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
240
  /**
241
  * Save Screen option
242
  */
5
  Description: Logs every email sent through WordPress. Compatible with WPMU too.
6
  Donate Link: http://sudarmuthu.com/if-you-wanna-thank-me
7
  Author: Sudar
8
+ Version: 1.6
9
  Author URI: http://sudarmuthu.com/
10
  Text Domain: email-log
11
  Domain Path: languages/
12
 
13
  === RELEASE NOTES ===
14
+ Check readme file for full release notes
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  */
16
+
17
  /* Copyright 2009 Sudar Muthu (email : sudar@sudarmuthu.com)
18
 
19
  This program is free software; you can redistribute it and/or modify
73
  $plugin = plugin_basename(__FILE__);
74
  add_filter("plugin_action_links_$plugin", array(&$this, 'add_action_links'));
75
 
76
+ //Add our ajax call
77
+ add_action( 'wp_ajax_display_content', array(&$this, 'display_content_callback'));
78
+
79
+ // Add our javascript in the footer
80
+ add_action( 'admin_footer', array(&$this, 'include_js') );
81
+
82
  $this->table_name = $wpdb->prefix . self::TABLE_NAME;
83
  }
84
 
200
  $this->logs_table = new Email_Log_List_Table();
201
  }
202
 
203
+ /**
204
+ * Include JavaScript displaying email content
205
+ *
206
+ * @since 1.6
207
+ */
208
+ function include_js() {
209
+ ?>
210
+ <script type="text/javascript">
211
+ jQuery(document).ready(function($) {
212
+
213
+ $(".email_content").click(function() {
214
+
215
+ var w = window.open('', 'newwin', 'width=650,height=500');
216
+
217
+ var email_id = $(this).attr('id').replace('email_content_','');
218
+ data = {
219
+ action: 'display_content',
220
+ email_id: email_id
221
+ };
222
+
223
+ $.post(ajaxurl, data, function (response) {
224
+ $(w.document.body).html(response);
225
+ });
226
+
227
+ });
228
+ });
229
+ </script>
230
+ <?php
231
+ }
232
+
233
+ /**
234
+ * AJAX callback for displaying email content
235
+ *
236
+ * @since 1.6
237
+ */
238
+ function display_content_callback() {
239
+ global $wpdb;
240
+ global $EmailLog;
241
+ $email_id = absint( $_POST['email_id'] );
242
+
243
+ // Select the matching item from the database
244
+ $query = $wpdb->prepare( "SELECT * FROM " . $EmailLog->table_name . " WHERE id = %d", $email_id );
245
+ $content = $wpdb->get_results( $query );
246
+
247
+ // Write the message content to the screen
248
+ echo $content[0]->message;
249
+
250
+ die(); // this is required to return a proper result
251
+ }
252
+
253
  /**
254
  * Save Screen option
255
  */
include/class-email-log-list-table.php CHANGED
@@ -174,10 +174,12 @@ class Email_Log_List_Table extends WP_List_Table {
174
 
175
  $email_date = mysql2date(sprintf(__('%s @ %s', 'email-log'), get_option('date_format'), get_option('time_format')), $item->sent_date);
176
 
177
- return sprintf('%1$s <span style="color:silver">(id:%2$s)</span>%3$s',
178
  /*$1%s*/ $email_date,
179
  /*$2%s*/ $item->id,
180
- /*$3%s*/ $this->row_actions($actions)
 
 
181
  );
182
  }
183
 
174
 
175
  $email_date = mysql2date(sprintf(__('%s @ %s', 'email-log'), get_option('date_format'), get_option('time_format')), $item->sent_date);
176
 
177
+ return sprintf('%1$s <span style="color:silver">[<a href="#" class="email_content" id="email_content_%2$s">%3$s</a>] (id:%4$s)</span>%5$s',
178
  /*$1%s*/ $email_date,
179
  /*$2%s*/ $item->id,
180
+ /*$3%s*/ __('View Content', 'email-log' ),
181
+ /*$4%s*/ $item->id,
182
+ /*$5%s*/ $this->row_actions($actions)
183
  );
184
  }
185
 
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.5.4\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/email-log\n"
7
- "POT-Creation-Date: 2013-09-21 07:16:41+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -12,77 +12,73 @@ msgstr ""
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
15
- #: email-log.php:130
16
  msgid "Buy Addons"
17
  msgstr ""
18
 
19
- #. #-#-#-#-# email-log.pot (Email Log 1.5.4) #-#-#-#-#
20
- #. Plugin Name of the plugin/theme
21
- #: email-log.php:140
22
  msgid "Email Log"
23
  msgstr ""
24
 
25
- #: email-log.php:154
26
  msgid "Email Logs"
27
  msgstr ""
28
 
29
- #: email-log.php:160
30
  msgid "1 email log deleted."
31
  msgid_plural "%s email logs deleted"
32
  msgstr[0] ""
33
  msgstr[1] ""
34
 
35
- #: email-log.php:162
36
  msgid "There was some problem in deleting the email logs"
37
  msgstr ""
38
 
39
- #: email-log.php:170
40
  msgid "Search Logs"
41
  msgstr ""
42
 
43
- #: email-log.php:203
44
  msgid "About Plugin"
45
  msgstr ""
46
 
47
- #: email-log.php:205
48
- msgid ""
49
- "Email Log WordPress Plugin, allows you to log all emails that are sent "
50
- "through WordPress."
51
  msgstr ""
52
 
53
- #: email-log.php:212
54
  msgid "More information"
55
  msgstr ""
56
 
57
- #: email-log.php:213
58
  msgid "Plugin Homepage/support"
59
  msgstr ""
60
 
61
- #: email-log.php:214
62
  msgid "Plugin author's blog"
63
  msgstr ""
64
 
65
- #: email-log.php:215
66
  msgid "Other Plugin's by Author"
67
  msgstr ""
68
 
69
- #: email-log.php:222
70
  msgid "Entries per page"
71
  msgstr ""
72
 
73
- #: email-log.php:271
74
  msgid "Log"
75
  msgstr ""
76
 
77
- #: email-log.php:281
78
  msgid "plugin"
79
  msgstr ""
80
 
81
- #: email-log.php:281
82
  msgid "Version"
83
  msgstr ""
84
 
85
- #: email-log.php:281
86
  msgid "by"
87
  msgstr ""
88
 
@@ -95,9 +91,7 @@ msgid "Buy Now"
95
  msgstr ""
96
 
97
  #: include/class-email-log-list-table.php:49
98
- msgid ""
99
- "The following are the list of pro addons that are currently available for "
100
- "purchase."
101
  msgstr ""
102
 
103
  #: include/class-email-log-list-table.php:55
@@ -105,9 +99,7 @@ msgid "Email Log - Forward Email"
105
  msgstr ""
106
 
107
  #: include/class-email-log-list-table.php:56
108
- msgid ""
109
- "This addon allows you to send a copy of all emails send from WordPress to "
110
- "another email address"
111
  msgstr ""
112
 
113
  #: include/class-email-log-list-table.php:57
@@ -125,8 +117,7 @@ msgid "Email Log - More fields"
125
  msgstr ""
126
 
127
  #: include/class-email-log-list-table.php:63
128
- msgid ""
129
- "Adds more fields (From, CC, BCC, Reply To, Attachment) to the logs page."
130
  msgstr ""
131
 
132
  #: include/class-email-log-list-table.php:88
@@ -134,6 +125,7 @@ msgid "Sent at"
134
  msgstr ""
135
 
136
  #: include/class-email-log-list-table.php:89
 
137
  msgid "To"
138
  msgstr ""
139
 
@@ -142,7 +134,7 @@ msgid "Subject"
142
  msgstr ""
143
 
144
  #: include/class-email-log-list-table.php:171
145
- #: include/class-email-log-list-table.php:232
146
  msgid "Delete"
147
  msgstr ""
148
 
@@ -150,10 +142,58 @@ msgstr ""
150
  msgid "%s @ %s"
151
  msgstr ""
152
 
153
- #: include/class-email-log-list-table.php:325
 
 
 
 
154
  msgid "Your email log is empty"
155
  msgstr ""
156
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
157
  #. Plugin URI of the plugin/theme
158
  msgid "http://sudarmuthu.com/wordpress/email-log"
159
  msgstr ""
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.6\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/email-log\n"
7
+ "POT-Creation-Date: 2013-12-08 15:03:49+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
12
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
  "Language-Team: LANGUAGE <LL@li.org>\n"
14
 
15
+ #: email-log.php:93
16
  msgid "Buy Addons"
17
  msgstr ""
18
 
19
+ #: email-log.php:103
 
 
20
  msgid "Email Log"
21
  msgstr ""
22
 
23
+ #: email-log.php:117
24
  msgid "Email Logs"
25
  msgstr ""
26
 
27
+ #: email-log.php:123
28
  msgid "1 email log deleted."
29
  msgid_plural "%s email logs deleted"
30
  msgstr[0] ""
31
  msgstr[1] ""
32
 
33
+ #: email-log.php:125
34
  msgid "There was some problem in deleting the email logs"
35
  msgstr ""
36
 
37
+ #: email-log.php:133
38
  msgid "Search Logs"
39
  msgstr ""
40
 
41
+ #: email-log.php:166 tmp_addon/email-log-forward-email.php:152
42
  msgid "About Plugin"
43
  msgstr ""
44
 
45
+ #: email-log.php:168 tmp_addon/email-log-forward-email.php:154
46
+ msgid "Email Log WordPress Plugin, allows you to log all emails that are sent through WordPress."
 
 
47
  msgstr ""
48
 
49
+ #: email-log.php:175 tmp_addon/email-log-forward-email.php:162
50
  msgid "More information"
51
  msgstr ""
52
 
53
+ #: email-log.php:176 tmp_addon/email-log-forward-email.php:163
54
  msgid "Plugin Homepage/support"
55
  msgstr ""
56
 
57
+ #: email-log.php:177 tmp_addon/email-log-forward-email.php:164
58
  msgid "Plugin author's blog"
59
  msgstr ""
60
 
61
+ #: email-log.php:178 tmp_addon/email-log-forward-email.php:165
62
  msgid "Other Plugin's by Author"
63
  msgstr ""
64
 
65
+ #: email-log.php:185
66
  msgid "Entries per page"
67
  msgstr ""
68
 
69
+ #: email-log.php:284
70
  msgid "Log"
71
  msgstr ""
72
 
73
+ #: email-log.php:294
74
  msgid "plugin"
75
  msgstr ""
76
 
77
+ #: email-log.php:294
78
  msgid "Version"
79
  msgstr ""
80
 
81
+ #: email-log.php:294
82
  msgid "by"
83
  msgstr ""
84
 
91
  msgstr ""
92
 
93
  #: include/class-email-log-list-table.php:49
94
+ msgid "The following are the list of pro addons that are currently available for purchase."
 
 
95
  msgstr ""
96
 
97
  #: include/class-email-log-list-table.php:55
99
  msgstr ""
100
 
101
  #: include/class-email-log-list-table.php:56
102
+ msgid "This addon allows you to send a copy of all emails send from WordPress to another email address"
 
 
103
  msgstr ""
104
 
105
  #: include/class-email-log-list-table.php:57
117
  msgstr ""
118
 
119
  #: include/class-email-log-list-table.php:63
120
+ msgid "Adds more fields (From, CC, BCC, Reply To, Attachment) to the logs page."
 
121
  msgstr ""
122
 
123
  #: include/class-email-log-list-table.php:88
125
  msgstr ""
126
 
127
  #: include/class-email-log-list-table.php:89
128
+ #: tmp_addon/email-log-forward-email.php:180
129
  msgid "To"
130
  msgstr ""
131
 
134
  msgstr ""
135
 
136
  #: include/class-email-log-list-table.php:171
137
+ #: include/class-email-log-list-table.php:234
138
  msgid "Delete"
139
  msgstr ""
140
 
142
  msgid "%s @ %s"
143
  msgstr ""
144
 
145
+ #: include/class-email-log-list-table.php:180
146
+ msgid "View Content"
147
+ msgstr ""
148
+
149
+ #: include/class-email-log-list-table.php:327
150
  msgid "Your email log is empty"
151
  msgstr ""
152
 
153
+ #: tmp_addon/email-log-forward-email.php:105
154
+ #: tmp_addon/email-log-forward-email.php:117
155
+ msgid "Forward Email"
156
+ msgstr ""
157
+
158
+ #: tmp_addon/email-log-forward-email.php:105
159
+ msgid "Email Log - Forward Email Addon"
160
+ msgstr ""
161
+
162
+ #: tmp_addon/email-log-forward-email.php:127
163
+ msgid "Forward Emails"
164
+ msgstr ""
165
+
166
+ #: tmp_addon/email-log-forward-email.php:181
167
+ #: tmp_addon/email-log-more-fields.php:81
168
+ msgid "CC"
169
+ msgstr ""
170
+
171
+ #: tmp_addon/email-log-forward-email.php:182
172
+ #: tmp_addon/email-log-more-fields.php:82
173
+ msgid "BCC"
174
+ msgstr ""
175
+
176
+ #: tmp_addon/email-log-forward-email.php:225
177
+ #: tmp_addon/email-log-forward-email.php:236
178
+ #: tmp_addon/email-log-forward-email.php:247
179
+ msgid "Enter multiple email address by separating them using comma"
180
+ msgstr ""
181
+
182
+ #: tmp_addon/email-log-more-fields.php:80
183
+ msgid "From"
184
+ msgstr ""
185
+
186
+ #: tmp_addon/email-log-more-fields.php:83
187
+ msgid "Reply To"
188
+ msgstr ""
189
+
190
+ #: tmp_addon/email-log-more-fields.php:84
191
+ msgid "Attachment"
192
+ msgstr ""
193
+ #. Plugin Name of the plugin/theme
194
+ msgid "Email Log"
195
+ msgstr ""
196
+
197
  #. Plugin URI of the plugin/theme
198
  msgid "http://sudarmuthu.com/wordpress/email-log"
199
  msgstr ""
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: sudar
3
  Tags: email, wpmu, wordpress-mu, log
4
  Requires at least: 3.3
5
- Tested up to: 3.6.1
6
- Stable tag: 1.5.4
7
 
8
  Logs every email sent through WordPress. Compatible with WPMU too.
9
 
@@ -184,22 +184,28 @@ Extract the zip file and drop the contents in the wp-content/plugins/ directory
184
  - Fix issue in searching non-english characters
185
  - Add addon screenshots
186
 
 
 
 
187
  == Upgrade Notice ==
188
 
189
- = 0.9.2 =
190
- Added filters for more customizing
191
 
192
- = 1.0 =
193
- Added support for buying pro addons
 
 
 
194
 
195
  = 1.5 =
196
  Rewrote Admin interface using native tables
197
 
198
- = 1.5.3 =
199
- Fix issue in bulk deleting logs
200
 
201
- = 1.5.4 =
202
- Fixed issue in searching for non-english characters
203
 
204
  == Readme Generator ==
205
 
2
  Contributors: sudar
3
  Tags: email, wpmu, wordpress-mu, log
4
  Requires at least: 3.3
5
+ Tested up to: 3.7.1
6
+ Stable tag: 1.6
7
 
8
  Logs every email sent through WordPress. Compatible with WPMU too.
9
 
184
  - Fix issue in searching non-english characters
185
  - Add addon screenshots
186
 
187
+ = v1.6 (2013-12-08) - (Dev time: 0.5 hours) =
188
+ - New: Add a link to view the content of the email in the log screen
189
+
190
  == Upgrade Notice ==
191
 
192
+ = 1.6 =
193
+ Ability to view content of the email
194
 
195
+ = 1.5.4 =
196
+ Fixed issue in searching for non-english characters
197
+
198
+ = 1.5.3 =
199
+ Fix issue in bulk deleting logs
200
 
201
  = 1.5 =
202
  Rewrote Admin interface using native tables
203
 
204
+ = 1.0 =
205
+ Added support for buying pro addons
206
 
207
+ = 0.9.2 =
208
+ Added filters for more customizing
209
 
210
  == Readme Generator ==
211