$extension =
$flow->
getContext()->
getExtension(self::MAIL_CONFIG_EXTENSION
);
if (!
$extension instanceof MailSendSubscriberConfig
) { $extension =
new MailSendSubscriberConfig(false,
[],
[]);
} if ($extension->
skip()) { return;
} if (!
$flow->
hasData(MailAware::MAIL_STRUCT
) || !
$flow->
hasData(MailAware::SALES_CHANNEL_ID
)) { throw new MailEventConfigurationException('Not have data from MailAware',
$flow::
class);
} $eventConfig =
$flow->
getConfig();
if (empty($eventConfig['recipient'
])) { throw new MailEventConfigurationException('The recipient value in the flow action configuration is missing.',
$flow::
class);
} if (!
isset($eventConfig['mailTemplateId'
])) { return;
}