Edit File by line
/home/zeestwma/richards.../wp-inclu...
File: class-wp-phpmailer.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* WordPress PHPMailer class.
[2] Fix | Delete
*
[3] Fix | Delete
* @package WordPress
[4] Fix | Delete
* @since 6.8.0
[5] Fix | Delete
*/
[6] Fix | Delete
[7] Fix | Delete
/**
[8] Fix | Delete
* WordPress PHPMailer class.
[9] Fix | Delete
*
[10] Fix | Delete
* Overrides the internationalization method in order to use WordPress' instead.
[11] Fix | Delete
*
[12] Fix | Delete
* @since 6.8.0
[13] Fix | Delete
*/
[14] Fix | Delete
class WP_PHPMailer extends PHPMailer\PHPMailer\PHPMailer {
[15] Fix | Delete
[16] Fix | Delete
/**
[17] Fix | Delete
* Constructor.
[18] Fix | Delete
*
[19] Fix | Delete
* @since 6.8.0
[20] Fix | Delete
*
[21] Fix | Delete
* @param bool $exceptions Optional. Whether to throw exceptions for errors. Default false.
[22] Fix | Delete
*/
[23] Fix | Delete
public function __construct( $exceptions = false ) {
[24] Fix | Delete
parent::__construct( $exceptions );
[25] Fix | Delete
$this->SetLanguage();
[26] Fix | Delete
}
[27] Fix | Delete
[28] Fix | Delete
/**
[29] Fix | Delete
* Defines the error messages using WordPress' internationalization method.
[30] Fix | Delete
*
[31] Fix | Delete
* @since 6.8.0
[32] Fix | Delete
*
[33] Fix | Delete
* @return true Always returns true.
[34] Fix | Delete
*/
[35] Fix | Delete
public function SetLanguage( $langcode = 'en', $lang_path = '' ) {
[36] Fix | Delete
$error_strings = array(
[37] Fix | Delete
'authenticate' => __( 'SMTP Error: Could not authenticate.' ),
[38] Fix | Delete
'buggy_php' => sprintf(
[39] Fix | Delete
/* translators: 1: mail.add_x_header. 2: php.ini */
[40] Fix | Delete
__(
[41] Fix | Delete
'Your version of PHP is affected by a bug that may result in corrupted messages. To fix it, switch to sending using SMTP, disable the %1$s option in your %2$s, or switch to MacOS or Linux, or upgrade your PHP version.'
[42] Fix | Delete
),
[43] Fix | Delete
'mail.add_x_header',
[44] Fix | Delete
'php.ini'
[45] Fix | Delete
),
[46] Fix | Delete
'connect_host' => __( 'SMTP Error: Could not connect to SMTP host.' ),
[47] Fix | Delete
'data_not_accepted' => __( 'SMTP Error: data not accepted.' ),
[48] Fix | Delete
'empty_message' => __( 'Message body empty' ),
[49] Fix | Delete
/* translators: There is a space after the colon. */
[50] Fix | Delete
'encoding' => __( 'Unknown encoding: ' ),
[51] Fix | Delete
/* translators: There is a space after the colon. */
[52] Fix | Delete
'execute' => __( 'Could not execute: ' ),
[53] Fix | Delete
/* translators: There is a space after the colon. */
[54] Fix | Delete
'extension_missing' => __( 'Extension missing: ' ),
[55] Fix | Delete
/* translators: There is a space after the colon. */
[56] Fix | Delete
'file_access' => __( 'Could not access file: ' ),
[57] Fix | Delete
/* translators: There is a space after the colon. */
[58] Fix | Delete
'file_open' => __( 'File Error: Could not open file: ' ),
[59] Fix | Delete
/* translators: There is a space after the colon. */
[60] Fix | Delete
'from_failed' => __( 'The following From address failed: ' ),
[61] Fix | Delete
'instantiate' => __( 'Could not instantiate mail function.' ),
[62] Fix | Delete
/* translators: There is a space after the colon. */
[63] Fix | Delete
'invalid_address' => __( 'Invalid address: ' ),
[64] Fix | Delete
'invalid_header' => __( 'Invalid header name or value' ),
[65] Fix | Delete
/* translators: There is a space after the colon. */
[66] Fix | Delete
'invalid_hostentry' => __( 'Invalid hostentry: ' ),
[67] Fix | Delete
/* translators: There is a space after the colon. */
[68] Fix | Delete
'invalid_host' => __( 'Invalid host: ' ),
[69] Fix | Delete
/* translators: There is a space at the beginning. */
[70] Fix | Delete
'mailer_not_supported' => __( ' mailer is not supported.' ),
[71] Fix | Delete
'provide_address' => __( 'You must provide at least one recipient email address.' ),
[72] Fix | Delete
/* translators: There is a space after the colon. */
[73] Fix | Delete
'recipients_failed' => __( 'SMTP Error: The following recipients failed: ' ),
[74] Fix | Delete
/* translators: There is a space after the colon. */
[75] Fix | Delete
'signing' => __( 'Signing Error: ' ),
[76] Fix | Delete
/* translators: There is a space after the colon. */
[77] Fix | Delete
'smtp_code' => __( 'SMTP code: ' ),
[78] Fix | Delete
/* translators: There is a space after the colon. */
[79] Fix | Delete
'smtp_code_ex' => __( 'Additional SMTP info: ' ),
[80] Fix | Delete
'smtp_connect_failed' => __( 'SMTP connect() failed.' ),
[81] Fix | Delete
/* translators: There is a space after the colon. */
[82] Fix | Delete
'smtp_detail' => __( 'Detail: ' ),
[83] Fix | Delete
/* translators: There is a space after the colon. */
[84] Fix | Delete
'smtp_error' => __( 'SMTP server error: ' ),
[85] Fix | Delete
/* translators: There is a space after the colon. */
[86] Fix | Delete
'variable_set' => __( 'Cannot set or reset variable: ' ),
[87] Fix | Delete
);
[88] Fix | Delete
$this->language = $error_strings;
[89] Fix | Delete
return true;
[90] Fix | Delete
}
[91] Fix | Delete
}
[92] Fix | Delete
[93] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function