Use admin_email as default sender.
[MAILPOET-5498]
This commit is contained in:
committed by
Aschepikov
parent
d7e283dea9
commit
ee882b99e9
@ -231,9 +231,11 @@ class Populator {
|
|||||||
// parse current user name if an email is used
|
// parse current user name if an email is used
|
||||||
$senderName = explode('@', $currentUserName);
|
$senderName = explode('@', $currentUserName);
|
||||||
$senderName = reset($senderName);
|
$senderName = reset($senderName);
|
||||||
|
// If current user is not set, default to admin email
|
||||||
|
$senderAddress = $currentUser->user_email ?: $this->wp->getOption('admin_email'); // phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
|
||||||
$defaultSender = [
|
$defaultSender = [
|
||||||
'name' => $senderName,
|
'name' => $senderName,
|
||||||
'address' => $currentUser->user_email ?: '', // phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps
|
'address' => $senderAddress ?: '',
|
||||||
];
|
];
|
||||||
$savedSender = $this->settings->fetch('sender', []);
|
$savedSender = $this->settings->fetch('sender', []);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user