return;
} $translationReader =
$this->container->
get(Shopware_Components_Translation::
class);
$translation =
$translationReader->
read($customer['languageId'
], 'config_mails',
$mailModel->
getId());
$mailModel->
setTranslation($translation);
$mailData =
[ 'content' =>
nl2br($mailModel->
getContent()) ?: '',
'fromMail' =>
$mailModel->
getFromMail() ?: '{config name=mail}',
'fromName' =>
$mailModel->
getFromName() ?: '{config name=shopName}',
'subject' =>
$mailModel->
getSubject(),
'toMail' =>
$customer['email'
],
'userId' =>
$userId,
'status'
=> ($mode === 'allow' ? 'accepted' : 'rejected'
),
];
$this->
View()->
assign(['success' => true, 'data' =>
$mailData]);
} /**
* Sends the mail to the merchant if the inquiry was
* successful or was declined.
*
* @return void
*/