$mapping[] =
['event_name' =>
$event['event_name'
], 'typeId' =>
$config['mail_template_type_id'
]];
} $mails =
$this->
fetchMails($connection,
array_column($mapping, 'typeId'
));
$mails =
$this->
map($mapping,
$mails);
$this->
insertMails($connection,
$mails);
// generate entries for order state mails
$ids =
$this->
getTypeIds($connection,
[ 'order_delivery.state.cancelled',
'order_delivery.state.returned',
'order_delivery.state.returned_partially',
'order_delivery.state.shipped',
'order_delivery.state.shipped_partially',
'order_transaction.state.cancelled',
'order_transaction.state.open',
'order_transaction.state.paid',
'order_transaction.state.paid_partially',
'order_transaction.state.refunded',
'order_transaction.state.refunded_partially',