Allow reply-to with only address
[MAILPOET-3812]
This commit is contained in:
@@ -118,7 +118,7 @@ class MailPoet {
|
||||
return $body;
|
||||
}
|
||||
|
||||
private function composeBody($newsletter, $subscriber, $unsubscribeUrl, $meta) {
|
||||
private function composeBody($newsletter, $subscriber, $unsubscribeUrl, $meta): array {
|
||||
$body = [
|
||||
'to' => ([
|
||||
'address' => $subscriber['email'],
|
||||
@@ -130,10 +130,12 @@ class MailPoet {
|
||||
]),
|
||||
'reply_to' => ([
|
||||
'address' => $this->replyTo['reply_to_email'],
|
||||
'name' => $this->replyTo['reply_to_name'],
|
||||
]),
|
||||
'subject' => $newsletter['subject'],
|
||||
];
|
||||
if (!empty($this->replyTo['reply_to_name'])) {
|
||||
$body['reply_to']['name'] = $this->replyTo['reply_to_name'];
|
||||
}
|
||||
if (!empty($newsletter['body']['html'])) {
|
||||
$body['html'] = $newsletter['body']['html'];
|
||||
}
|
||||
|
Reference in New Issue
Block a user