Add space between if and ‘(‘
[MAILPOET-1791]
This commit is contained in:
@ -5,7 +5,7 @@ use MailPoet\Mailer\Mailer;
|
||||
use MailPoet\Mailer\Methods\ErrorMappers\SMTPMapper;
|
||||
use MailPoet\WP\Functions as WPFunctions;
|
||||
|
||||
if(!defined('ABSPATH')) exit;
|
||||
if (!defined('ABSPATH')) exit;
|
||||
|
||||
class SMTP {
|
||||
public $host;
|
||||
@ -56,7 +56,7 @@ class SMTP {
|
||||
$this->error_mapper->getErrorFromException($e, $subscriber)
|
||||
);
|
||||
}
|
||||
if($result === 1) {
|
||||
if ($result === 1) {
|
||||
return Mailer::formatMailerSendSuccessResult();
|
||||
} else {
|
||||
$error = $this->error_mapper->getErrorFromLog($this->mailer_logger->dump(), $subscriber);
|
||||
@ -69,7 +69,7 @@ class SMTP {
|
||||
$this->host, $this->port, $this->encryption);
|
||||
$connection_timeout = $this->wp->applyFilters('mailpoet_mailer_smtp_connection_timeout', self::SMTP_CONNECTION_TIMEOUT);
|
||||
$transport->setTimeout($connection_timeout);
|
||||
if($this->authentication) {
|
||||
if ($this->authentication) {
|
||||
$transport
|
||||
->setUsername($this->login)
|
||||
->setPassword($this->password);
|
||||
@ -94,14 +94,14 @@ class SMTP {
|
||||
)
|
||||
->setReturnPath($this->return_path)
|
||||
->setSubject($newsletter['subject']);
|
||||
if(!empty($extra_params['unsubscribe_url'])) {
|
||||
if (!empty($extra_params['unsubscribe_url'])) {
|
||||
$headers = $message->getHeaders();
|
||||
$headers->addTextHeader('List-Unsubscribe', '<' . $extra_params['unsubscribe_url'] . '>');
|
||||
}
|
||||
if(!empty($newsletter['body']['html'])) {
|
||||
if (!empty($newsletter['body']['html'])) {
|
||||
$message = $message->setBody($newsletter['body']['html'], 'text/html');
|
||||
}
|
||||
if(!empty($newsletter['body']['text'])) {
|
||||
if (!empty($newsletter['body']['text'])) {
|
||||
$message = $message->addPart($newsletter['body']['text'], 'text/plain');
|
||||
}
|
||||
return $message;
|
||||
@ -109,7 +109,7 @@ class SMTP {
|
||||
|
||||
function processSubscriber($subscriber) {
|
||||
preg_match('!(?P<name>.*?)\s<(?P<email>.*?)>!', $subscriber, $subscriber_data);
|
||||
if(!isset($subscriber_data['email'])) {
|
||||
if (!isset($subscriber_data['email'])) {
|
||||
$subscriber_data = array(
|
||||
'email' => $subscriber,
|
||||
);
|
||||
|
Reference in New Issue
Block a user