WP Mail Bank: WordPress SMTP Plugin & Email Logs - Version 2.0.4

Version Description

  • Major Bugs Fixed
  • CSS Confliction Fixed with Other Plugins
  • Roles & Capabilities Bug Fixed
  • Obsolete Code Removed
  • Database Updated
  • Improved Plugin Security
Download this release

Release Info

Developer contact-banker
Plugin Icon 128x128 WP Mail Bank: WordPress SMTP Plugin & Email Logs
Version 2.0.4
Comparing to
See all releases

Code changes from version 2.0.3 to 2.0.4

assets/global/plugins/custom/css/custom-rtl.css CHANGED
@@ -901,21 +901,6 @@
901
  {
902
  display: table-row-group;
903
  }
904
- .collapsing
905
- {
906
- position: relative;
907
- height: 0;
908
- overflow: hidden;
909
- -webkit-transition-timing-function: ease;
910
- o-transition-timing-function: ease;
911
- transition-timing-function: ease;
912
- -webkit-transition-duration: .35s;
913
- -o-transition-duration: .35s;
914
- transition-duration: .35s;
915
- -webkit-transition-property: height, visibility;
916
- -o-transition-property: height, visibility;
917
- transition-property: height, visibility;
918
- }
919
  .caret
920
  {
921
  display: inline-block;
@@ -1150,32 +1135,6 @@
1150
  {
1151
  clear: both;
1152
  }
1153
- .center-block
1154
- {
1155
- display: block;
1156
- margin-right: auto;
1157
- margin-left: auto;
1158
- }
1159
- .hide
1160
- {
1161
- display: none !important;
1162
- }
1163
- .show
1164
- {
1165
- display: block !important;
1166
- }
1167
- .invisible
1168
- {
1169
- visibility: hidden;
1170
- }
1171
- .text-hide
1172
- {
1173
- font: 0/0 a;
1174
- color: transparent;
1175
- text-shadow: none;
1176
- background-color: transparent;
1177
- border: 0;
1178
- }
1179
  div.dataTables_length label
1180
  {
1181
  font-weight: normal;
901
  {
902
  display: table-row-group;
903
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
904
  .caret
905
  {
906
  display: inline-block;
1135
  {
1136
  clear: both;
1137
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1138
  div.dataTables_length label
1139
  {
1140
  font-weight: normal;
assets/global/plugins/custom/css/custom.css CHANGED
@@ -900,21 +900,6 @@
900
  {
901
  display: table-row-group;
902
  }
903
- .collapsing
904
- {
905
- position: relative;
906
- height: 0;
907
- overflow: hidden;
908
- -webkit-transition-timing-function: ease;
909
- o-transition-timing-function: ease;
910
- transition-timing-function: ease;
911
- -webkit-transition-duration: .35s;
912
- -o-transition-duration: .35s;
913
- transition-duration: .35s;
914
- -webkit-transition-property: height, visibility;
915
- -o-transition-property: height, visibility;
916
- transition-property: height, visibility;
917
- }
918
  .caret
919
  {
920
  display: inline-block;
@@ -1167,26 +1152,6 @@
1167
  margin-right: auto;
1168
  margin-left: auto;
1169
  }
1170
- .hide
1171
- {
1172
- display: none !important;
1173
- }
1174
- .show
1175
- {
1176
- display: block !important;
1177
- }
1178
- .invisible
1179
- {
1180
- visibility: hidden;
1181
- }
1182
- .text-hide
1183
- {
1184
- font: 0/0 a;
1185
- color: transparent;
1186
- text-shadow: none;
1187
- background-color: transparent;
1188
- border: 0;
1189
- }
1190
  div.dataTables_length label
1191
  {
1192
  font-weight: normal;
900
  {
901
  display: table-row-group;
902
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
903
  .caret
904
  {
905
  display: inline-block;
1152
  margin-right: auto;
1153
  margin-left: auto;
1154
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1155
  div.dataTables_length label
1156
  {
1157
  font-weight: normal;
includes/footer.php CHANGED
@@ -261,6 +261,34 @@ else
261
  jQuery("#ux_div_test_mail").css("display","block");
262
  }
263
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
264
  if(typeof(mail_bank_mail_sender) != "function")
265
  {
266
  function mail_bank_mail_sender(to_email_address)
@@ -453,6 +481,7 @@ else
453
  {
454
  jQuery("#ux_div_username_password_authentication").css("display","none");
455
  jQuery("#ux_div_oauth_authentication").css("display","block");
 
456
  }
457
  else
458
  {
@@ -657,27 +686,7 @@ else
657
  if(jQuery.trim(data) != "")
658
  {
659
  jQuery("#ux_txt_host").val(data);
660
- var indexof = data.indexOf("yahoo");
661
- var hostname = data.substr(indexof,5);
662
- if(jQuery.trim(data) == "smtp.gmail.com")
663
- {
664
- jQuery("#ux_link_content").text("("+<?php echo json_encode($mb_email_configuration_get_google_credentials); ?> +")");
665
- jQuery("#ux_link_reference").attr("href","https://console.developers.google.com");
666
- }
667
- else if(jQuery.trim(data) == "smtp.live.com")
668
- {
669
- jQuery("#ux_link_content").text("("+<?php echo json_encode($mb_email_configuration_get_microsoft_credentials); ?>+")");
670
- jQuery("#ux_link_reference").attr("href","https://account.live.com/developers/applications/create");
671
- }
672
- else if(hostname == "yahoo")
673
- {
674
- jQuery("#ux_link_content").text("("+<?php echo json_encode($mb_email_configuration_get_yahoo_credentials); ?>+")");
675
- jQuery("#ux_link_reference").attr("href","https://developer.yahoo.com/apps/");
676
- }
677
- else
678
- {
679
- jQuery("#ux_link_content").text("");
680
- }
681
  }
682
  else
683
  {
@@ -697,28 +706,25 @@ else
697
  var hostname = host_type.substr(indexof,5);
698
  if(host_type == "smtp.gmail.com")
699
  {
700
- jQuery("#ux_link_content").text("("+<?php echo json_encode($mb_email_configuration_get_google_credentials); ?>+")");
701
- jQuery("#ux_link_reference").attr("href","https://console.developers.google.com");
702
  jQuery("#ux_ddl_mb_authentication").val("oauth2");
703
  select_credentials_mail_bank();
704
  }
705
  else if(host_type == "smtp.live.com")
706
  {
707
- jQuery("#ux_link_content").text("("+<?php echo json_encode($mb_email_configuration_get_microsoft_credentials); ?>+")");
708
- jQuery("#ux_link_reference").attr("href","https://account.live.com/developers/applications/create");
709
  jQuery("#ux_ddl_mb_authentication").val("oauth2");
710
  select_credentials_mail_bank();
711
  }
712
  else if(hostname == "yahoo")
713
  {
714
- jQuery("#ux_link_content").text("("+<?php echo json_encode($mb_email_configuration_get_yahoo_credentials); ?>+")");
715
- jQuery("#ux_link_reference").attr("href","https://developer.yahoo.com/apps/");
716
  jQuery("#ux_ddl_mb_authentication").val("oauth2");
717
  select_credentials_mail_bank();
718
  }
719
  else
720
  {
721
- jQuery("#ux_link_content").text("");
722
  jQuery("#ux_ddl_mb_authentication").val("login");
723
  select_credentials_mail_bank();
724
  }
@@ -997,12 +1003,6 @@ else
997
  <?php
998
  }
999
  break;
1000
- case "mb_email_log_details":
1001
- case "mb_email_debugging_output":
1002
- ?>
1003
- jQuery("#ux_mb_li_email_logs").addClass("active");
1004
- <?php
1005
- break;
1006
  case "mb_settings":
1007
  ?>
1008
  jQuery("#ux_mb_li_settings").addClass("active");
261
  jQuery("#ux_div_test_mail").css("display","block");
262
  }
263
  }
264
+ if(typeof(check_links_oauth_mail_bank) != "function")
265
+ {
266
+ function check_links_oauth_mail_bank()
267
+ {
268
+ var smtp_host = jQuery("#ux_txt_host").val();
269
+ var indexof = smtp_host.indexOf("yahoo");
270
+ var hostname = smtp_host.substr(indexof,5);
271
+ if(smtp_host == "smtp.gmail.com")
272
+ {
273
+ jQuery("#ux_link_content").text("("+<?php echo json_encode($mb_email_configuration_get_google_credentials); ?> +")");
274
+ jQuery("#ux_link_reference").attr("href","https://console.developers.google.com");
275
+ }
276
+ else if(smtp_host == "smtp.live.com")
277
+ {
278
+ jQuery("#ux_link_content").text("("+<?php echo json_encode($mb_email_configuration_get_microsoft_credentials); ?>+")");
279
+ jQuery("#ux_link_reference").attr("href","https://account.live.com/developers/applications/create");
280
+ }
281
+ else if(hostname == "yahoo")
282
+ {
283
+ jQuery("#ux_link_content").text("("+<?php echo json_encode($mb_email_configuration_get_yahoo_credentials); ?>+")");
284
+ jQuery("#ux_link_reference").attr("href","https://developer.yahoo.com/apps/");
285
+ }
286
+ else
287
+ {
288
+ jQuery("#ux_link_content").text("");
289
+ }
290
+ }
291
+ }
292
  if(typeof(mail_bank_mail_sender) != "function")
293
  {
294
  function mail_bank_mail_sender(to_email_address)
481
  {
482
  jQuery("#ux_div_username_password_authentication").css("display","none");
483
  jQuery("#ux_div_oauth_authentication").css("display","block");
484
+ check_links_oauth_mail_bank();
485
  }
486
  else
487
  {
686
  if(jQuery.trim(data) != "")
687
  {
688
  jQuery("#ux_txt_host").val(data);
689
+ check_links_oauth_mail_bank();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
690
  }
691
  else
692
  {
706
  var hostname = host_type.substr(indexof,5);
707
  if(host_type == "smtp.gmail.com")
708
  {
709
+ check_links_oauth_mail_bank();
 
710
  jQuery("#ux_ddl_mb_authentication").val("oauth2");
711
  select_credentials_mail_bank();
712
  }
713
  else if(host_type == "smtp.live.com")
714
  {
715
+ check_links_oauth_mail_bank();
 
716
  jQuery("#ux_ddl_mb_authentication").val("oauth2");
717
  select_credentials_mail_bank();
718
  }
719
  else if(hostname == "yahoo")
720
  {
721
+ check_links_oauth_mail_bank();
 
722
  jQuery("#ux_ddl_mb_authentication").val("oauth2");
723
  select_credentials_mail_bank();
724
  }
725
  else
726
  {
727
+ check_links_oauth_mail_bank();
728
  jQuery("#ux_ddl_mb_authentication").val("login");
729
  select_credentials_mail_bank();
730
  }
1003
  <?php
1004
  }
1005
  break;
 
 
 
 
 
 
1006
  case "mb_settings":
1007
  ?>
1008
  jQuery("#ux_mb_li_settings").addClass("active");
includes/mail-bank-email-log.php CHANGED
@@ -86,7 +86,6 @@ if(!class_exists("mail_bank_email_log_writter"))
86
  }
87
  $email_logs_data_array["timestamp"] = time();
88
  $email_logs_data_array["status"] = $status;
89
- update_option("mail_bank_is_mail_sent",$status);
90
  global $wpdb;
91
  $email_logs_id = $wpdb->get_var
92
  (
86
  }
87
  $email_logs_data_array["timestamp"] = time();
88
  $email_logs_data_array["status"] = $status;
 
89
  global $wpdb;
90
  $email_logs_id = $wpdb->get_var
91
  (
includes/mail-bank-send-mail.php CHANGED
@@ -119,6 +119,7 @@ if(!class_exists("mail_bank_send_mail"))
119
  update_option("mail_bank_mail_status",true);
120
  }
121
  $obj_mb_log_writter = new mail_bank_email_log_writter();
 
122
  if($settings_data["monitor_email_logs"] == "enable")
123
  {
124
  $obj_mb_log_writter->mb_success_log($log,$message,$settings_data["debug_mode"], $email_configuration_settings,$obj_mail_bank_manage_email);
@@ -146,6 +147,7 @@ if(!class_exists("mail_bank_send_mail"))
146
  update_option("mail_bank_mail_status",false);
147
  }
148
  $obj_mb_log_writter = new mail_bank_email_log_writter();
 
149
  if($settings_data["monitor_email_logs"] == "enable")
150
  {
151
  $obj_mb_log_writter->mb_failure_log($log,$message,$settings_data["debug_mode"],$email_configuration_settings,$obj_mail_bank_manage_email);
119
  update_option("mail_bank_mail_status",true);
120
  }
121
  $obj_mb_log_writter = new mail_bank_email_log_writter();
122
+ update_option("mail_bank_is_mail_sent","Sent");
123
  if($settings_data["monitor_email_logs"] == "enable")
124
  {
125
  $obj_mb_log_writter->mb_success_log($log,$message,$settings_data["debug_mode"], $email_configuration_settings,$obj_mail_bank_manage_email);
147
  update_option("mail_bank_mail_status",false);
148
  }
149
  $obj_mb_log_writter = new mail_bank_email_log_writter();
150
+ update_option("mail_bank_is_mail_sent","Not Sent");
151
  if($settings_data["monitor_email_logs"] == "enable")
152
  {
153
  $obj_mb_log_writter->mb_failure_log($log,$message,$settings_data["debug_mode"],$email_configuration_settings,$obj_mail_bank_manage_email);
includes/queries.php CHANGED
@@ -13,6 +13,7 @@ if(!is_user_logged_in())
13
  }
14
  else
15
  {
 
16
  foreach($user_role_permission as $permission)
17
  {
18
  if(current_user_can($permission))
@@ -63,17 +64,6 @@ else
63
 
64
  if(isset($_GET["page"]))
65
  {
66
- $user_capabilities = array();
67
- foreach(get_editable_roles() as $role_name => $role_info)
68
- {
69
- foreach($role_info["capabilities"] as $capability => $values)
70
- {
71
- if(!in_array($capability,$user_capabilities))
72
- {
73
- array_push($user_capabilities,$capability);
74
- }
75
- }
76
- }
77
  switch(esc_attr($_GET["page"]))
78
  {
79
  case "mb_roles_and_capabilities":
@@ -100,28 +90,6 @@ else
100
  $unserialized_email_logs_data = get_mail_bank_log_data_unserialize($email_logs_data,$start_date,$end_date);
101
  break;
102
 
103
- case "mb_email_log_details":
104
- case "mb_email_debugging_output":
105
-
106
- if(isset($_REQUEST["log_id"]))
107
- {
108
- $log_id = intval($_REQUEST["log_id"]);
109
- $email_log_data = $wpdb->get_var
110
- (
111
- $wpdb->prepare
112
- (
113
- "SELECT meta_value FROM ".mail_bank_meta()."
114
- WHERE meta_key = %s AND id = %d ",
115
- "email_logs",
116
- $log_id
117
-
118
- )
119
- );
120
- $email_log_details = unserialize($email_log_data);
121
- }
122
-
123
- break;
124
-
125
  case "mb_email_configuration":
126
 
127
  $email_configuration_array = get_mail_bank_meta_value("email_configuration");
13
  }
14
  else
15
  {
16
+ $access_granted = false;
17
  foreach($user_role_permission as $permission)
18
  {
19
  if(current_user_can($permission))
64
 
65
  if(isset($_GET["page"]))
66
  {
 
 
 
 
 
 
 
 
 
 
 
67
  switch(esc_attr($_GET["page"]))
68
  {
69
  case "mb_roles_and_capabilities":
90
  $unserialized_email_logs_data = get_mail_bank_log_data_unserialize($email_logs_data,$start_date,$end_date);
91
  break;
92
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
93
  case "mb_email_configuration":
94
 
95
  $email_configuration_array = get_mail_bank_meta_value("email_configuration");
includes/sidebar.php CHANGED
@@ -13,6 +13,7 @@ if(!is_user_logged_in())
13
  }
14
  else
15
  {
 
16
  foreach($user_role_permission as $permission)
17
  {
18
  if(current_user_can($permission))
13
  }
14
  else
15
  {
16
+ $access_granted = false;
17
  foreach($user_role_permission as $permission)
18
  {
19
  if(current_user_can($permission))
lib/admin-bar-menu.php CHANGED
@@ -73,6 +73,10 @@ else
73
  case "subscriber":
74
  $flag = $capabilities[4];
75
  break;
 
 
 
 
76
  }
77
 
78
  if($flag == "1")
73
  case "subscriber":
74
  $flag = $capabilities[4];
75
  break;
76
+
77
+ default:
78
+ $flag = $capabilities[5];
79
+ break;
80
  }
81
 
82
  if($flag == "1")
lib/sidebar-menu.php CHANGED
@@ -80,8 +80,9 @@ else
80
  break;
81
 
82
  default:
83
- $privileges = "administrator_privileges";
84
- $flag = $capabilities[0];
 
85
  }
86
 
87
  foreach($roles_and_capabilities_unserialized_data as $key=>$value)
80
  break;
81
 
82
  default:
83
+ $privileges = "other_roles_privileges";
84
+ $flag = $capabilities[5];
85
+ break;
86
  }
87
 
88
  foreach($roles_and_capabilities_unserialized_data as $key=>$value)
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: contact-banker, Gallery-Bank, wordpress-empire
3
  Tags: email, gmail, mail, mail smtp, mailer, outgoing mail, phpmailer, sendmail, smtp, ssl, tls, WordPress smtp, wp smtp, wp-phpmailer, wp_mail, wp mail, mailer, mail bank
4
  Requires at least: 2.7
5
  Tested up to: 4.6.1
6
- Stable tag: 2.0.3
7
 
8
  Mail Bank reconfigures the Mail Function and provides sophisticated SMTP settings to send and log emails from your WordPress site.
9
 
@@ -365,6 +365,15 @@ If any problem occurs, please contact us at [support@tech-banker.com](mailto:sup
365
 
366
  == Changelog ==
367
 
 
 
 
 
 
 
 
 
 
368
  = 2.0.3 =
369
 
370
  * Major Bug Fixed Related to Warning/Error Messages on Plugin Upgrade
3
  Tags: email, gmail, mail, mail smtp, mailer, outgoing mail, phpmailer, sendmail, smtp, ssl, tls, WordPress smtp, wp smtp, wp-phpmailer, wp_mail, wp mail, mailer, mail bank
4
  Requires at least: 2.7
5
  Tested up to: 4.6.1
6
+ Stable tag: 2.0.4
7
 
8
  Mail Bank reconfigures the Mail Function and provides sophisticated SMTP settings to send and log emails from your WordPress site.
9
 
365
 
366
  == Changelog ==
367
 
368
+ = 2.0.4 =
369
+
370
+ * Major Bugs Fixed
371
+ * CSS Confliction Fixed with Other Plugins
372
+ * Roles & Capabilities Bug Fixed
373
+ * Obsolete Code Removed
374
+ * Database Updated
375
+ * Improved Plugin Security
376
+
377
  = 2.0.3 =
378
 
379
  * Major Bug Fixed Related to Warning/Error Messages on Plugin Upgrade
views/email-logs/email-logs.php CHANGED
@@ -192,7 +192,7 @@ else
192
  <i class="icon-custom-share-alt tooltips" data-original-title="<?php echo $mb_email_logs_show_details ;?>" data-placement="top"></i>
193
  </a> |
194
  <a onclick="premium_edition_notification_mail_bank()">
195
- <i class="icon-custom-trash tooltips" data-original-title="<?php echo $mb_email_logs_delete ;?>" onclick="delete_email_logs(<?php echo $value["id"] ?>)" data-placement="top"></i>
196
  </a>
197
  </td>
198
  </tr>
192
  <i class="icon-custom-share-alt tooltips" data-original-title="<?php echo $mb_email_logs_show_details ;?>" data-placement="top"></i>
193
  </a> |
194
  <a onclick="premium_edition_notification_mail_bank()">
195
+ <i class="icon-custom-trash tooltips" data-original-title="<?php echo $mb_email_logs_delete ;?>" data-placement="top"></i>
196
  </a>
197
  </td>
198
  </tr>
views/email-setup/email-setup.php CHANGED
@@ -83,6 +83,9 @@ else
83
  <li><?php echo $mb_open_ssl_message; ?></li>
84
  <?php
85
  }
 
 
 
86
  if($mb_message_translate_help != "")
87
  {
88
  ?>
83
  <li><?php echo $mb_open_ssl_message; ?></li>
84
  <?php
85
  }
86
+ ?>
87
+ </ul>
88
+ <?php
89
  if($mb_message_translate_help != "")
90
  {
91
  ?>
views/roles-and-capabilities/roles-and-capabilities.php CHANGED
@@ -470,6 +470,7 @@ else
470
  <tbody>
471
  <?php
472
  $flag = 0;
 
473
  foreach($user_capabilities as $key => $value)
474
  {
475
  $other_roles = in_array($value,$other_roles_array) ? "checked=checked" : "";
470
  <tbody>
471
  <?php
472
  $flag = 0;
473
+ $user_capabilities = get_others_capabilities_mail_bank();
474
  foreach($user_capabilities as $key => $value)
475
  {
476
  $other_roles = in_array($value,$other_roles_array) ? "checked=checked" : "";
wp-mail-bank.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://beta.tech-banker.com
5
  Description: Mail Bank reconfigures the wp_mail() function and make it more enhanced.
6
  Author: Tech Banker
7
  Author URI: http://beta.tech-banker.com
8
- Version: 2.0.3
9
  License: GPLv3
10
  */
11
 
@@ -633,7 +633,7 @@ if(!function_exists("get_others_capabilities_mail_bank"))
633
  $user_capabilities = array();
634
  foreach(get_editable_roles() as $role_name => $role_info)
635
  {
636
- foreach($role_info["capabilities"] as $capability => $_)
637
  {
638
  if(!in_array($capability,$user_capabilities))
639
  {
5
  Description: Mail Bank reconfigures the wp_mail() function and make it more enhanced.
6
  Author: Tech Banker
7
  Author URI: http://beta.tech-banker.com
8
+ Version: 2.0.4
9
  License: GPLv3
10
  */
11
 
633
  $user_capabilities = array();
634
  foreach(get_editable_roles() as $role_name => $role_info)
635
  {
636
+ foreach($role_info["capabilities"] as $capability => $values)
637
  {
638
  if(!in_array($capability,$user_capabilities))
639
  {