summaryrefslogtreecommitdiff
path: root/Postman/Postman-Email-Log
diff options
context:
space:
mode:
Diffstat (limited to 'Postman/Postman-Email-Log')
-rw-r--r--Postman/Postman-Email-Log/PostmanEmailLogController.php4
-rw-r--r--Postman/Postman-Email-Log/PostmanEmailLogService.php6
-rw-r--r--Postman/Postman-Email-Log/PostmanEmailLogView.php5
3 files changed, 11 insertions, 4 deletions
diff --git a/Postman/Postman-Email-Log/PostmanEmailLogController.php b/Postman/Postman-Email-Log/PostmanEmailLogController.php
index 7d9337a..d1f0057 100644
--- a/Postman/Postman-Email-Log/PostmanEmailLogController.php
+++ b/Postman/Postman-Email-Log/PostmanEmailLogController.php
@@ -43,6 +43,8 @@ class PostmanEmailLogController {
$this,
'on_admin_init',
) );
+
+
}
if ( is_admin() ) {
$actionName = self::RESEND_MAIL_AJAX_SLUG;
@@ -390,7 +392,7 @@ class PostmanEmailLogController {
</select>
</div>
<div class="form-control" style="padding: 0 5px 0 5px;">
- <button type="submit" name="filter" class="button button-primary"><?php _e( 'Filter', Postman::TEXT_DOMAIN ); ?></button>
+ <button type="submit" name="filter" class="button button-primary"><?php _e( 'Filter/Search', Postman::TEXT_DOMAIN ); ?></button>
</div>
<div class="form-control">
<button type="submit" id="postman_trash_all" name="postman_trash_all" class="button button-primary"><?php _e( 'Trash All', Postman::TEXT_DOMAIN ); ?></button>
diff --git a/Postman/Postman-Email-Log/PostmanEmailLogService.php b/Postman/Postman-Email-Log/PostmanEmailLogService.php
index 6c0784b..a087916 100644
--- a/Postman/Postman-Email-Log/PostmanEmailLogService.php
+++ b/Postman/Postman-Email-Log/PostmanEmailLogService.php
@@ -160,14 +160,16 @@ if ( ! class_exists( 'PostmanEmailLogService' ) ) {
$message .= "\r\n" . __( 'You are welcome to post a support issue.', Postman::TEXT_DOMAIN );
$message .= "\r\n" . __( 'The log to paste with your support issue:', Postman::TEXT_DOMAIN ) . "\r\n";
+ $to_email = get_bloginfo( 'admin_email' );
+ $domain = get_bloginfo( 'url' );
if ( $log->statusMessage && ! empty( $log->statusMessage ) ) {
- mail( get_bloginfo( 'admin_email' ), __( 'Post SMTP email error', Postman::TEXT_DOMAIN ), $message . $log->statusMessage );
+ mail( $to_email, "{$domain}: " . __( 'Post SMTP email error', Postman::TEXT_DOMAIN ), $message . $log->statusMessage, null, "-f{$to_email}" );
}
preg_match_all( '/(.*)From/s', $log->sessionTranscript, $matches );
if ( isset( $matches[1][0] ) && ! empty( $matches[1][0] ) && strpos( strtolower( $matches[1][0] ), 'error' ) !== false ) {
- mail( get_bloginfo( 'admin_email' ), __( 'Post SMTP session transcript error', Postman::TEXT_DOMAIN ), $message . $log->sessionTranscript );
+ mail( $to_email, "{$domain}: " . __( 'Post SMTP session transcript error', Postman::TEXT_DOMAIN ), $message . $log->sessionTranscript, null, "-f{$to_email}" );
}
}
diff --git a/Postman/Postman-Email-Log/PostmanEmailLogView.php b/Postman/Postman-Email-Log/PostmanEmailLogView.php
index 2fb3f72..a754a42 100644
--- a/Postman/Postman-Email-Log/PostmanEmailLogView.php
+++ b/Postman/Postman-Email-Log/PostmanEmailLogView.php
@@ -55,6 +55,7 @@ class PostmanEmailLogView extends WP_List_Table {
*/
function column_default( $item, $column_name ) {
switch ( $column_name ) {
+ case 'sent_to' :
case 'date' :
case 'status' :
return $item [ $column_name ];
@@ -159,6 +160,7 @@ class PostmanEmailLogView extends WP_List_Table {
$columns = array(
'cb' => '<input type="checkbox" />', // Render a checkbox instead of text
'title' => _x( 'Subject', 'What is the subject of this message?', Postman::TEXT_DOMAIN ),
+ 'sent_to' => __( 'Sent To', Postman::TEXT_DOMAIN ),
'status' => __( 'Status', Postman::TEXT_DOMAIN ),
'date' => _x( 'Delivery Time', 'When was this email sent?', Postman::TEXT_DOMAIN ),
);
@@ -363,9 +365,10 @@ class PostmanEmailLogView extends WP_List_Table {
/* Translators: where %s indicates the relative time from now */
$date = sprintf( _x( '%s ago', 'A relative time as in "five days ago"', Postman::TEXT_DOMAIN ), $humanTime );
}
-
+ $meta_values = get_post_meta( $post->ID );
$flattenedPost = array(
// the post title must be escaped as they are displayed in the HTML output
+ 'sent_to' => sanitize_email( $meta_values ['to_header'] [0] ),
'title' => esc_html( $post->post_title ),
// the post status must be escaped as they are displayed in the HTML output
'status' => ($post->post_excerpt != null ? esc_html( $post->post_excerpt ) : __( 'Sent', Postman::TEXT_DOMAIN )),