summaryrefslogtreecommitdiff
path: root/Postman/Postman-Email-Log/PostmanEmailLogService.php
diff options
context:
space:
mode:
Diffstat (limited to 'Postman/Postman-Email-Log/PostmanEmailLogService.php')
-rw-r--r--Postman/Postman-Email-Log/PostmanEmailLogService.php6
1 files changed, 4 insertions, 2 deletions
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}" );
}
}