summaryrefslogtreecommitdiff
path: root/Postman/Postman-Email-Log/PostmanEmailLogService.php
diff options
context:
space:
mode:
authoryehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664>2019-05-15 12:14:32 +0000
committeryehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664>2019-05-15 12:14:32 +0000
commit38153c0f3e739f3d89a1a7734fd7d199bf457fab (patch)
tree28e19f4e091d5182a2c63bc98377e5381b0043ac /Postman/Postman-Email-Log/PostmanEmailLogService.php
parent942aa536210fe204a2d097eb8878c1d690e0547b (diff)
downloadPost-SMTP-38153c0f3e739f3d89a1a7734fd7d199bf457fab.zip
= 2.0 - 2019-05-15
* New: Mailer Type - Added an option to send without overwrite the 'wp_mail' function, better compability to WordPress delivery. hopefully will be the default in the future. * Updated: Sendgrid API was upgraded and rewritten to the new version. * Fixed: Message-Id header was missing on SMTP * Fixed: Email logger optimization - better query for large amount of records. * Fixed: The localization was fixed to match translate.wordpress.org translation system ( Thanks to Niels de Blaauw from Level-Level ). * Fixed: Code and optimization ( Thanks to Niels de Blaauw from Level-Level ).
Diffstat (limited to 'Postman/Postman-Email-Log/PostmanEmailLogService.php')
-rw-r--r--Postman/Postman-Email-Log/PostmanEmailLogService.php36
1 files changed, 18 insertions, 18 deletions
diff --git a/Postman/Postman-Email-Log/PostmanEmailLogService.php b/Postman/Postman-Email-Log/PostmanEmailLogService.php
index dd51974..b1b1dff 100644
--- a/Postman/Postman-Email-Log/PostmanEmailLogService.php
+++ b/Postman/Postman-Email-Log/PostmanEmailLogService.php
@@ -67,7 +67,7 @@ if ( ! class_exists( 'PostmanEmailLogService' ) ) {
* Logs successful email attempts
*
* @param PostmanMessage $message
- * @param unknown $transcript
+ * @param mixed $transcript
* @param PostmanModuleTransport $transport
*/
public function writeSuccessLog( PostmanEmailLog $log, PostmanMessage $message, $transcript, PostmanModuleTransport $transport ) {
@@ -76,7 +76,7 @@ if ( ! class_exists( 'PostmanEmailLogService' ) ) {
$status = true;
$subject = $message->getSubject();
if ( empty( $subject ) ) {
- $statusMessage = sprintf( '%s: %s', __( 'Warning', Postman::TEXT_DOMAIN ), __( 'An empty subject line can result in delivery failure.', Postman::TEXT_DOMAIN ) );
+ $statusMessage = sprintf( '%s: %s', __( 'Warning', 'post-smtp' ), __( 'An empty subject line can result in delivery failure.', 'post-smtp' ) );
$status = 'WARN';
}
$this->createLog( $log, $message, $transcript, $statusMessage, $status, $transport );
@@ -88,13 +88,13 @@ if ( ! class_exists( 'PostmanEmailLogService' ) ) {
* Logs failed email attempts, requires more metadata so the email can be resent in the future
*
* @param PostmanMessage $message
- * @param unknown $transcript
+ * @param mixed $transcript
* @param PostmanModuleTransport $transport
- * @param unknown $statusMessage
- * @param unknown $originalTo
- * @param unknown $originalSubject
- * @param unknown $originalMessage
- * @param unknown $originalHeaders
+ * @param mixed $statusMessage
+ * @param mixed $originalTo
+ * @param mixed $originalSubject
+ * @param mixed $originalMessage
+ * @param mixed $originalHeaders
*/
public function writeFailureLog( PostmanEmailLog $log, PostmanMessage $message = null, $transcript, PostmanModuleTransport $transport, $statusMessage ) {
if ( PostmanOptions::getInstance()->isMailLoggingEnabled() ) {
@@ -182,9 +182,9 @@ if ( ! class_exists( 'PostmanEmailLogService' ) ) {
}
private function checkForLogErrors( PostmanEmailLog $log, $postMessage ) {
- $message = __( 'You getting this message because an error detected while delivered your email.', Postman::TEXT_DOMAIN );
- $message .= "\r\n" . sprintf( __( 'For the domain: %1$s',Postman::TEXT_DOMAIN ), get_bloginfo('url') );
- $message .= "\r\n" . __( 'The log to paste when you open a support issue:', Postman::TEXT_DOMAIN ) . "\r\n";
+ $message = __( 'You getting this message because an error detected while delivered your email.', 'post-smtp' );
+ $message .= "\r\n" . sprintf( __( 'For the domain: %1$s','post-smtp' ), get_bloginfo('url') );
+ $message .= "\r\n" . __( 'The log to paste when you open a support issue:', 'post-smtp' ) . "\r\n";
if ( $log->statusMessage && ! empty( $log->statusMessage ) ) {
require_once POST_PATH . '/Postman/notifications/PostmanNotify.php';
@@ -227,9 +227,9 @@ if ( ! class_exists( 'PostmanEmailLogService' ) ) {
* Creates a Log object for use by writeToEmailLog()
*
* @param PostmanMessage $message
- * @param unknown $transcript
- * @param unknown $statusMessage
- * @param unknown $success
+ * @param mixed $transcript
+ * @param mixed $statusMessage
+ * @param mixed $success
* @param PostmanModuleTransport $transport
* @return PostmanEmailLog
*/
@@ -263,7 +263,7 @@ if ( ! class_exists( 'PostmanEmailLogService' ) ) {
$count = 0;
foreach ( $addresses as $address ) {
if ( $count >= 3 ) {
- $flat .= sprintf( __( '.. +%d more', Postman::TEXT_DOMAIN ), sizeof( $addresses ) - $count );
+ $flat .= sprintf( __( '.. +%d more', 'post-smtp' ), sizeof( $addresses ) - $count );
break;
}
if ( $count > 0 ) {
@@ -284,7 +284,7 @@ if ( ! class_exists( 'PostmanEmailLogPurger' ) ) {
/**
*
- * @return unknown
+ * @return mixed
*/
function __construct( $args = array() ) {
$this->logger = new PostmanLogger( get_class( $this ) );
@@ -313,7 +313,7 @@ if ( ! class_exists( 'PostmanEmailLogPurger' ) ) {
/**
*
* @param array $posts
- * @param unknown $postid
+ * @param mixed $postid
*/
function verifyLogItemExistsAndRemove( $postid ) {
$force_delete = true;
@@ -336,7 +336,7 @@ if ( ! class_exists( 'PostmanEmailLogPurger' ) ) {
/**
*
- * @param unknown $size
+ * @param mixed $size
*/
function truncateLogItems( $size ) {
$index = count( $this->posts );