Version Description
Download this release
Release Info
Developer | wpexpertsio |
Plugin | Post SMTP Mailer/Email Log |
Version | 2.0.25-beta.1 |
Comparing to | |
See all releases |
Code changes from version 2.0.24 to 2.0.25-beta.1
- Postman/Postman-Email-Log/PostmanEmailLogView.php +1 -16
- Postman/Postman-Mail/google-api-client/vendor/google/apiclient/src/Google/Service/Resource.php +1 -1
- Postman/Postman-Send-Test-Email/PostmanSendTestEmailController.php +12 -4
- Postman/Postman.php +7 -1
- Postman/PostmanViewController.php +4 -4
- Postman/PostmanWpMailBinder.php +9 -0
- postman-smtp.php +2 -2
- readme.txt +12 -0
- style/postman.css +7 -2
Postman/Postman-Email-Log/PostmanEmailLogView.php
CHANGED
@@ -390,22 +390,7 @@ class PostmanEmailLogView extends WP_List_Table {
|
|
390 |
);
|
391 |
array_push( $data, $flattenedPost );
|
392 |
}
|
393 |
-
|
394 |
-
/**
|
395 |
-
* This checks for sorting input and sorts the data in our array accordingly.
|
396 |
-
*
|
397 |
-
* In a real-world situation involving a database, you would probably want
|
398 |
-
* to handle sorting by passing the 'orderby' and 'order' values directly
|
399 |
-
* to a custom query. The returned data will be pre-sorted, and this array
|
400 |
-
* sorting technique would be unnecessary.
|
401 |
-
*/
|
402 |
-
function usort_reorder( $a, $b ) {
|
403 |
-
$orderby = ( ! empty( $_REQUEST ['orderby'] )) ? sanitize_text_field($_REQUEST ['orderby']) : 'title'; // If no sort, default to title
|
404 |
-
$order = ( ! empty( $_REQUEST ['order'] )) ? sanitize_text_field($_REQUEST ['order']) : 'asc'; // If no order, default to asc
|
405 |
-
$result = strcmp( $a [ $orderby ], $b [ $orderby ] ); // Determine sort order
|
406 |
-
return ($order === 'asc') ? $result : - $result; // Send final sort direction to usort
|
407 |
-
}
|
408 |
-
// usort($data, 'usort_reorder');
|
409 |
/**
|
410 |
* *********************************************************************
|
411 |
* ---------------------------------------------------------------------
|
390 |
);
|
391 |
array_push( $data, $flattenedPost );
|
392 |
}
|
393 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
394 |
/**
|
395 |
* *********************************************************************
|
396 |
* ---------------------------------------------------------------------
|
Postman/Postman-Mail/google-api-client/vendor/google/apiclient/src/Google/Service/Resource.php
CHANGED
@@ -288,7 +288,7 @@ class Google_Service_Resource
|
|
288 |
}
|
289 |
|
290 |
if (count($queryVars)) {
|
291 |
-
$requestUrl .= '?' . implode(
|
292 |
}
|
293 |
|
294 |
return $requestUrl;
|
288 |
}
|
289 |
|
290 |
if (count($queryVars)) {
|
291 |
+
$requestUrl .= '?' . implode( '&', $queryVars );
|
292 |
}
|
293 |
|
294 |
return $requestUrl;
|
Postman/Postman-Send-Test-Email/PostmanSendTestEmailController.php
CHANGED
@@ -204,6 +204,10 @@ class PostmanSendTestEmailAjaxController extends PostmanAbstractAjaxHandler {
|
|
204 |
|
205 |
/**
|
206 |
* This Ajax sends a test email
|
|
|
|
|
|
|
|
|
207 |
*/
|
208 |
function sendTestEmailViaAjax() {
|
209 |
|
@@ -225,11 +229,15 @@ class PostmanSendTestEmailAjaxController extends PostmanAbstractAjaxHandler {
|
|
225 |
) );
|
226 |
|
227 |
// this header specifies that there are many parts (one text part, one html part)
|
228 |
-
$header = 'Content-Type: multipart/alternative;';
|
|
|
229 |
|
230 |
// createt the message content
|
231 |
$message = $this->createMessageContent();
|
232 |
-
|
|
|
|
|
|
|
233 |
// send the message
|
234 |
$success = wp_mail( $email, $subject, $message, $header );
|
235 |
|
@@ -339,7 +347,7 @@ class PostmanSendTestEmailAjaxController extends PostmanAbstractAjaxHandler {
|
|
339 |
' <div style="max-width: 600px; height: 400px; margin: 0 auto; overflow: hidden;background-image:url(\'https://ps.w.org/postman-smtp/assets/email/poofytoo.png\');background-repeat: no-repeat;">',
|
340 |
sprintf( ' <div style="margin:50px 0 0 300px; width:300px; font-size:2em;">%s</div>', $greeting ),
|
341 |
sprintf( ' <div style="text-align:right;font-size: 1.4em; color:black;margin:150px 0 0 200px;">%s', $sentBy ),
|
342 |
-
' <br
|
343 |
' </div>',
|
344 |
' </div>',
|
345 |
' </td>',
|
@@ -356,4 +364,4 @@ class PostmanSendTestEmailAjaxController extends PostmanAbstractAjaxHandler {
|
|
356 |
);
|
357 |
return implode( PostmanMessage::EOL, $messageArray );
|
358 |
}
|
359 |
-
}
|
204 |
|
205 |
/**
|
206 |
* This Ajax sends a test email
|
207 |
+
*
|
208 |
+
* @since 1.0
|
209 |
+
* @since 2.0.25 @filter `postman_test_email_args`
|
210 |
+
* @version 1.0
|
211 |
*/
|
212 |
function sendTestEmailViaAjax() {
|
213 |
|
229 |
) );
|
230 |
|
231 |
// this header specifies that there are many parts (one text part, one html part)
|
232 |
+
$header = 'Content-Type: multipart/alternative; \r\n';
|
233 |
+
$header .= 'MIME-Version: 1.0 \r\n';
|
234 |
|
235 |
// createt the message content
|
236 |
$message = $this->createMessageContent();
|
237 |
+
|
238 |
+
$email_args = apply_filters( 'postman_test_email_args', compact( 'email', 'subject', 'message', 'header' ) );
|
239 |
+
extract( $email_args );
|
240 |
+
|
241 |
// send the message
|
242 |
$success = wp_mail( $email, $subject, $message, $header );
|
243 |
|
347 |
' <div style="max-width: 600px; height: 400px; margin: 0 auto; overflow: hidden;background-image:url(\'https://ps.w.org/postman-smtp/assets/email/poofytoo.png\');background-repeat: no-repeat;">',
|
348 |
sprintf( ' <div style="margin:50px 0 0 300px; width:300px; font-size:2em;">%s</div>', $greeting ),
|
349 |
sprintf( ' <div style="text-align:right;font-size: 1.4em; color:black;margin:150px 0 0 200px;">%s', $sentBy ),
|
350 |
+
' <br/>',
|
351 |
' </div>',
|
352 |
' </div>',
|
353 |
' </td>',
|
364 |
);
|
365 |
return implode( PostmanMessage::EOL, $messageArray );
|
366 |
}
|
367 |
+
}
|
Postman/Postman.php
CHANGED
@@ -193,6 +193,7 @@ class Postman {
|
|
193 |
if ( PostmanUtils::isAdmin() && is_admin() ) {
|
194 |
$this->setup_admin();
|
195 |
}
|
|
|
196 |
}
|
197 |
|
198 |
/**
|
@@ -425,10 +426,15 @@ class Postman {
|
|
425 |
*
|
426 |
* The Gmail API used to be a separate plugin which was registered when that plugin
|
427 |
* was loaded. But now both the SMTP, Gmail API and other transports are registered here.
|
428 |
-
*
|
429 |
* @param mixed $pluginData
|
430 |
*/
|
431 |
private function registerTransports( $rootPluginFilenameAndPath ) {
|
|
|
|
|
|
|
|
|
|
|
432 |
$postman_transport_registry = PostmanTransportRegistry::getInstance();
|
433 |
|
434 |
$postman_transport_registry->registerTransport( new PostmanDefaultModuleTransport( $rootPluginFilenameAndPath ) );
|
193 |
if ( PostmanUtils::isAdmin() && is_admin() ) {
|
194 |
$this->setup_admin();
|
195 |
}
|
196 |
+
|
197 |
}
|
198 |
|
199 |
/**
|
426 |
*
|
427 |
* The Gmail API used to be a separate plugin which was registered when that plugin
|
428 |
* was loaded. But now both the SMTP, Gmail API and other transports are registered here.
|
429 |
+
* @since 2.0.25 require `PostmanAdminController.php` if not exists.
|
430 |
* @param mixed $pluginData
|
431 |
*/
|
432 |
private function registerTransports( $rootPluginFilenameAndPath ) {
|
433 |
+
|
434 |
+
if( !class_exists( 'PostmanAdminController' ) ) {
|
435 |
+
require_once 'PostmanAdminController.php';
|
436 |
+
}
|
437 |
+
|
438 |
$postman_transport_registry = PostmanTransportRegistry::getInstance();
|
439 |
|
440 |
$postman_transport_registry->registerTransport( new PostmanDefaultModuleTransport( $rootPluginFilenameAndPath ) );
|
Postman/PostmanViewController.php
CHANGED
@@ -238,8 +238,8 @@ if ( ! class_exists( 'PostmanViewController' ) ) {
|
|
238 |
*/
|
239 |
public static function outputChildPageHeader( $title, $slug = '' ) {
|
240 |
printf( '<h2>%s</h2>', sprintf( __( '%s Setup', 'post-smtp' ), __( 'Post SMTP', 'post-smtp' ) ) );
|
241 |
-
printf( '<div id="postman-main-menu" class="welcome-panel %s">', $slug );
|
242 |
-
print '<div class="welcome-panel-content">';
|
243 |
print '<div class="welcome-panel-column-container">';
|
244 |
print '<div class="welcome-panel-column welcome-panel-last">';
|
245 |
printf( '<h4>%s</h4>', $title );
|
@@ -328,8 +328,8 @@ if ( ! class_exists( 'PostmanViewController' ) ) {
|
|
328 |
//include_once POST_SMTP_PATH . '/Postman/extra/donation.php';
|
329 |
|
330 |
echo '<div class="twitter-wrap">';
|
331 |
-
print '<div id="postman-main-menu" class="welcome-panel">';
|
332 |
-
print '<div class="welcome-panel-content">';
|
333 |
print '<div class="welcome-panel-column-container" style="display: flex; flex-wrap: wrap; justify-content: space-around; align-items: flex-start;">';
|
334 |
print '<div class="ps-welcome-panel-column">';
|
335 |
printf( '<h4>%s</h4>', __( 'Configuration', 'post-smtp' ) );
|
238 |
*/
|
239 |
public static function outputChildPageHeader( $title, $slug = '' ) {
|
240 |
printf( '<h2>%s</h2>', sprintf( __( '%s Setup', 'post-smtp' ), __( 'Post SMTP', 'post-smtp' ) ) );
|
241 |
+
printf( '<div id="postman-main-menu" class="post-smtp-welcome-panel %s">', $slug );
|
242 |
+
print '<div class="post-smtp-welcome-panel-content">';
|
243 |
print '<div class="welcome-panel-column-container">';
|
244 |
print '<div class="welcome-panel-column welcome-panel-last">';
|
245 |
printf( '<h4>%s</h4>', $title );
|
328 |
//include_once POST_SMTP_PATH . '/Postman/extra/donation.php';
|
329 |
|
330 |
echo '<div class="twitter-wrap">';
|
331 |
+
print '<div id="postman-main-menu" class="post-smtp-welcome-panel">';
|
332 |
+
print '<div class="post-smtp-welcome-panel-content">';
|
333 |
print '<div class="welcome-panel-column-container" style="display: flex; flex-wrap: wrap; justify-content: space-around; align-items: flex-start;">';
|
334 |
print '<div class="ps-welcome-panel-column">';
|
335 |
printf( '<h4>%s</h4>', __( 'Configuration', 'post-smtp' ) );
|
Postman/PostmanWpMailBinder.php
CHANGED
@@ -108,13 +108,22 @@ if (! class_exists ( 'PostmanWpMailBinder' )) {
|
|
108 |
* Optional. Additional headers.
|
109 |
* @param string|array $attachments
|
110 |
* Optional. Files to attach.
|
|
|
111 |
* @return bool Whether the email contents were sent successfully.
|
112 |
*/
|
113 |
function wp_mail($to, $subject, $message, $headers = '', $attachments = array()) {
|
114 |
// create an instance of PostmanWpMail to send the message
|
115 |
$postmanWpMail = new PostmanWpMail ();
|
116 |
// send the mail
|
|
|
|
|
|
|
117 |
$result = $postmanWpMail->send ( $to, $subject, $message, $headers, $attachments );
|
|
|
|
|
|
|
|
|
|
|
118 |
// return the result
|
119 |
return $result;
|
120 |
}
|
108 |
* Optional. Additional headers.
|
109 |
* @param string|array $attachments
|
110 |
* Optional. Files to attach.
|
111 |
+
* @since 2.0.25 @action `wp_mail_succeeded` added.
|
112 |
* @return bool Whether the email contents were sent successfully.
|
113 |
*/
|
114 |
function wp_mail($to, $subject, $message, $headers = '', $attachments = array()) {
|
115 |
// create an instance of PostmanWpMail to send the message
|
116 |
$postmanWpMail = new PostmanWpMail ();
|
117 |
// send the mail
|
118 |
+
|
119 |
+
$mail_data = compact( 'to', 'subject', 'message', 'headers', 'attachments' );
|
120 |
+
|
121 |
$result = $postmanWpMail->send ( $to, $subject, $message, $headers, $attachments );
|
122 |
+
|
123 |
+
if( $result ) {
|
124 |
+
do_action( 'wp_mail_succeeded', $mail_data );
|
125 |
+
}
|
126 |
+
|
127 |
// return the result
|
128 |
return $result;
|
129 |
}
|
postman-smtp.php
CHANGED
@@ -6,7 +6,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
6 |
* Plugin Name: Post SMTP
|
7 |
* Plugin URI: https://wordpress.org/plugins/post-smtp/
|
8 |
* Description: Email not reliable? Post SMTP is the first and only WordPress SMTP plugin to implement OAuth 2.0 for Gmail, Hotmail and Yahoo Mail. Setup is a breeze with the Configuration Wizard and integrated Port Tester. Enjoy worry-free delivery even if your password changes!
|
9 |
-
* Version: 2.0.
|
10 |
* Author: Post SMTP
|
11 |
* Text Domain: post-smtp
|
12 |
* Author URI: https://postmansmtp.com
|
@@ -35,7 +35,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
35 |
define( 'POST_SMTP_BASE', __FILE__ );
|
36 |
define( 'POST_SMTP_PATH', __DIR__ );
|
37 |
define( 'POST_SMTP_URL', plugins_url('', POST_SMTP_BASE ) );
|
38 |
-
define( 'POST_SMTP_VER', '2.0.
|
39 |
define( 'POST_SMTP_SHOW_RELEASE_MESSAGE', true );
|
40 |
define( 'POST_SMTP_RELEASE_MESSAGE', "THE FUTURE OF Post SMTP - PLEASE READ!" );
|
41 |
define( 'POST_SMTP_RELEASE_URL', 'https://postmansmtp.com/the-future-of-post-smtp/' );
|
6 |
* Plugin Name: Post SMTP
|
7 |
* Plugin URI: https://wordpress.org/plugins/post-smtp/
|
8 |
* Description: Email not reliable? Post SMTP is the first and only WordPress SMTP plugin to implement OAuth 2.0 for Gmail, Hotmail and Yahoo Mail. Setup is a breeze with the Configuration Wizard and integrated Port Tester. Enjoy worry-free delivery even if your password changes!
|
9 |
+
* Version: 2.0.25
|
10 |
* Author: Post SMTP
|
11 |
* Text Domain: post-smtp
|
12 |
* Author URI: https://postmansmtp.com
|
35 |
define( 'POST_SMTP_BASE', __FILE__ );
|
36 |
define( 'POST_SMTP_PATH', __DIR__ );
|
37 |
define( 'POST_SMTP_URL', plugins_url('', POST_SMTP_BASE ) );
|
38 |
+
define( 'POST_SMTP_VER', '2.0.25' );
|
39 |
define( 'POST_SMTP_SHOW_RELEASE_MESSAGE', true );
|
40 |
define( 'POST_SMTP_RELEASE_MESSAGE', "THE FUTURE OF Post SMTP - PLEASE READ!" );
|
41 |
define( 'POST_SMTP_RELEASE_URL', 'https://postmansmtp.com/the-future-of-post-smtp/' );
|
readme.txt
CHANGED
@@ -281,6 +281,18 @@ To avoid being flagged as spam, you need to prove your email isn't forged. On a
|
|
281 |
|
282 |
== Changelog ==
|
283 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
284 |
= 2.0.24 - 2022-02-13
|
285 |
* Update: THE FUTURE OF Post SMTP - https://postmansmtp.com/the-future-of-post-smtp/
|
286 |
|
281 |
|
282 |
== Changelog ==
|
283 |
|
284 |
+
= 2.0.25 =
|
285 |
+
* **Bug Fixes**
|
286 |
+
* WP 5.9 Compatibility Ballon UI issue.
|
287 |
+
* Uncaught Error: Class ‘PostmanAdminController’ not found.
|
288 |
+
* Ajax error appearing due to Google API depreciated function.
|
289 |
+
|
290 |
+
* **Improvements**
|
291 |
+
* Code Optimization.
|
292 |
+
* MIME version added to test mails to prevent emails from spam.
|
293 |
+
* NEW Filter `postman_test_email_args` added to modify test email arguments.
|
294 |
+
* NEW Action `wp_mail_succeeded` added to exectue on every success email delivery.
|
295 |
+
|
296 |
= 2.0.24 - 2022-02-13
|
297 |
* Update: THE FUTURE OF Post SMTP - https://postmansmtp.com/the-future-of-post-smtp/
|
298 |
|
style/postman.css
CHANGED
@@ -12,8 +12,9 @@
|
|
12 |
border-radius: 5px;
|
13 |
}
|
14 |
|
15 |
-
.welcome-panel-content {
|
16 |
-
|
|
|
17 |
}
|
18 |
|
19 |
#postman-main-menu.welcome-panel {
|
@@ -135,6 +136,10 @@ p#back_to_main_menu {
|
|
135 |
background: url(images/badge.png) no-repeat;
|
136 |
}
|
137 |
|
|
|
|
|
|
|
|
|
138 |
|
139 |
@keyframes pulse {
|
140 |
0% {
|
12 |
border-radius: 5px;
|
13 |
}
|
14 |
|
15 |
+
.post-smtp-welcome-panel-content {
|
16 |
+
width: 100%;
|
17 |
+
padding: 10px 0;
|
18 |
}
|
19 |
|
20 |
#postman-main-menu.welcome-panel {
|
136 |
background: url(images/badge.png) no-repeat;
|
137 |
}
|
138 |
|
139 |
+
.post-smtp-welcome-panel {
|
140 |
+
background: #fff;
|
141 |
+
}
|
142 |
+
|
143 |
|
144 |
@keyframes pulse {
|
145 |
0% {
|