Changeset 59246 for trunk/src/wp-includes/PHPMailer/SMTP.php
- Timestamp:
- 10/17/2024 11:29:17 AM (7 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/PHPMailer/SMTP.php
r57137 r59246 14 14 * @copyright 2010 - 2012 Jim Jagielski 15 15 * @copyright 2004 - 2009 Andy Prevost 16 * @license http ://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License16 * @license https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html GNU Lesser General Public License 17 17 * @note This program is distributed in the hope that it will be useful - WITHOUT 18 18 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or … … 36 36 * @var string 37 37 */ 38 const VERSION = '6.9. 1';38 const VERSION = '6.9.2'; 39 39 40 40 /** … … 153 153 * Whether to use VERP. 154 154 * 155 * @see http ://en.wikipedia.org/wiki/Variable_envelope_return_path156 * @see http ://www.postfix.org/VERP_README.html Info on VERP155 * @see https://en.wikipedia.org/wiki/Variable_envelope_return_path 156 * @see https://www.postfix.org/VERP_README.html Info on VERP 157 157 * 158 158 * @var bool … … 165 165 * This needs to be quite high to function correctly with hosts using greetdelay as an anti-spam measure. 166 166 * 167 * @see http ://tools.ietf.org/html/rfc2821#section-4.5.3.2167 * @see https://www.rfc-editor.org/rfc/rfc2821#section-4.5.3.2 168 168 * 169 169 * @var int … … 188 188 protected $smtp_transaction_id_patterns = [ 189 189 'exim' => '/[\d]{3} OK id=(.*)/', 190 'sendmail' => '/[\d]{3} 2 .0.0 (.*) Message/',191 'postfix' => '/[\d]{3} 2 .0.0 Ok: queued as (.*)/',192 'Microsoft_ESMTP' => '/[0-9]{3} 2 .[\d].0 (.*)@(?:.*) Queued mail for delivery/',190 'sendmail' => '/[\d]{3} 2\.0\.0 (.*) Message/', 191 'postfix' => '/[\d]{3} 2\.0\.0 Ok: queued as (.*)/', 192 'Microsoft_ESMTP' => '/[0-9]{3} 2\.[\d]\.0 (.*)@(?:.*) Queued mail for delivery/', 193 193 'Amazon_SES' => '/[\d]{3} Ok (.*)/', 194 194 'SendGrid' => '/[\d]{3} Ok: queued as (.*)/', 195 'CampaignMonitor' => '/[\d]{3} 2 .0.0 OK:([a-zA-Z\d]{48})/',195 'CampaignMonitor' => '/[\d]{3} 2\.0\.0 OK:([a-zA-Z\d]{48})/', 196 196 'Haraka' => '/[\d]{3} Message Queued \((.*)\)/', 197 197 'ZoneMTA' => '/[\d]{3} Message queued as (.*)/', … … 281 281 //Is this a PSR-3 logger? 282 282 if ($this->Debugoutput instanceof \Psr\Log\LoggerInterface) { 283 $this->Debugoutput->debug($str); 283 //Remove trailing line breaks potentially added by calls to SMTP::client_send() 284 $this->Debugoutput->debug(rtrim($str, "\r\n")); 284 285 285 286 return; … … 294 295 case 'error_log': 295 296 //Don't output, just log 297 /** @noinspection ForgottenDebugOutputInspection */ 296 298 error_log($str); 297 299 break; … … 405 407 if ($streamok) { 406 408 $socket_context = stream_context_create($options); 407 set_error_handler([$this, 'errorHandler']); 409 set_error_handler(function () { 410 call_user_func_array([$this, 'errorHandler'], func_get_args()); 411 }); 408 412 $connection = stream_socket_client( 409 413 $host . ':' . $port, … … 420 424 self::DEBUG_CONNECTION 421 425 ); 422 set_error_handler([$this, 'errorHandler']); 426 set_error_handler(function () { 427 call_user_func_array([$this, 'errorHandler'], func_get_args()); 428 }); 423 429 $connection = fsockopen( 424 430 $host, … … 484 490 485 491 //Begin encrypted connection 486 set_error_handler([$this, 'errorHandler']); 492 set_error_handler(function () { 493 call_user_func_array([$this, 'errorHandler'], func_get_args()); 494 }); 487 495 $crypto_ok = stream_socket_enable_crypto( 488 496 $this->smtp_conn, … … 649 657 650 658 //The following borrowed from 651 //http ://php.net/manual/en/function.mhash.php#27225659 //https://www.php.net/manual/en/function.mhash.php#27225 652 660 653 661 //RFC 2104 HMAC implementation for php. … … 1163 1171 $this->edebug('CLIENT -> SERVER: ' . $data, self::DEBUG_CLIENT); 1164 1172 } 1165 set_error_handler([$this, 'errorHandler']); 1173 set_error_handler(function () { 1174 call_user_func_array([$this, 'errorHandler'], func_get_args()); 1175 }); 1166 1176 $result = fwrite($this->smtp_conn, $data); 1167 1177 restore_error_handler(); … … 1266 1276 //Must pass vars in here as params are by reference 1267 1277 //solution for signals inspired by https://github.com/symfony/symfony/pull/6540 1268 set_error_handler([$this, 'errorHandler']); 1278 set_error_handler(function () { 1279 call_user_func_array([$this, 'errorHandler'], func_get_args()); 1280 }); 1269 1281 $n = stream_select($selR, $selW, $selW, $this->Timelimit); 1270 1282 restore_error_handler();
Note: See TracChangeset
for help on using the changeset viewer.