Files
piratepoet/mailpoet/tests/docker/codeception/wp-56-phpmailer-fix.php
Jan Jakes 82aeb89854 Use strict types in tests
[MAILPOET-2688]
2022-11-29 15:04:09 +01:00

26 lines
624 B
PHP

<?php declare(strict_types = 1);
/*
Plugin Name: MailPoet Testing Fix: Use SMTP In PHPMailer on WP 5.6
Version: 0.1
*/
add_action('phpmailer_init', 'mailpoet_test_phpmailer_use_smtp');
//phpcs:disable Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
function mailpoet_test_phpmailer_use_smtp($phpmailer) {
global $wp_version;
if (!getenv('CIRCLE_BRANCH') || !preg_match('/^5\.6/', $wp_version)) {
return;
}
$phpmailer->isSMTP();
$phpmailer->Host = 'mailhog';
$phpmailer->SMTPAuth = false;
$phpmailer->Port = 1025;
$phpmailer->Username = '';
$phpmailer->Password = '';
}