Merge pull request #5584 from turbo124/v5-develop

Add fallback for replyto name
This commit is contained in:
David Bomba 2021-05-03 14:51:10 +10:00 committed by GitHub
commit c3de225d71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -75,7 +75,11 @@ class NinjaMailerJob implements ShouldQueue
if (strlen($this->nmo->settings->reply_to_email) > 1) { if (strlen($this->nmo->settings->reply_to_email) > 1) {
$reply_to_name = strlen($this->nmo->settings->reply_to_name) > 3 ? $this->nmo->settings->reply_to_name : $this->nmo->settings->reply_to_email; if(property_exists($this->nmo->settings, 'reply_to_name'))
$reply_to_name = strlen($this->nmo->settings->reply_to_name) > 3 ? $this->nmo->settings->reply_to_name : $this->nmo->settings->reply_to_email;
else
$reply_to_name = $this->nmo->settings->reply_to_email;
$this->nmo->mailable->replyTo($this->nmo->settings->reply_to_email, $reply_to_name); $this->nmo->mailable->replyTo($this->nmo->settings->reply_to_email, $reply_to_name);
} }