'status' =>
$statusId,
'mailname' =>
$templateName,
]);
if (!
empty($result)) { $context['EventResult'
] =
$result->
getValues();
} $mail =
Shopware()->
TemplateMail()->
createMail($templateName,
$context,
$shop);
$return =
[ 'content' =>
$mail->
getPlainBodyText() ?? '',
'subject' =>
$mail->
getPlainSubject() ?? '',
'email' =>
trim($user['email'
]),
'frommail' =>
$mail->
getFrom(),
'fromname' =>
$mail->
getFromName(),
];
$return =
$this->eventManager->
filter('Shopware_Controllers_Backend_OrderState_Filter',
$return,
[ 'subject' =>
Shopware()->
Front(),
'id' =>
$orderId,
'status' =>
$statusId,
'mailname' =>
$templateName,