Configuration/FormConfigurationFactory.php
private function buildAdminMailConfigurationByTypeAndData(AbstractType $type, $formData, $locale, $attributes)
    {
        if ($type->getNotifyDeactivateMails($formData)) {
            return null;
        }

        $adminMailConfiguration = $this->createMailConfiguration($locale);

        $adminMailConfiguration->setSubject($type->getNotifySubject($formData));
        $adminMailConfiguration->setFrom($type->getNotifyFromMailAddress($formData));
        $adminMailConfiguration->setTo($type->getNotifyToMailAddress($formData));
        $adminMailConfiguration->setReplyTo($type->getNotifyReplyToMailAddress($formData));
        $adminMailConfiguration->setAddAttachments($type->getNotifySendAttachments($formData));
        $adminMailConfiguration->setTemplate($type->getNotifyMail($formData));
        $adminMailConfiguration->setTemplateAttributes($attributes);

        return $adminMailConfiguration;
    }
private function buildAdminMailConfigurationByTypeAndData(AbstractType $type, $formData, $locale, $attributes)
    {
        if ($type->getNotifyDeactivateMails($formData)) {
            return null;
        }

        $adminMailConfiguration = $this->createMailConfiguration($locale);

        $adminMailConfiguration->setSubject($type->getNotifySubject($formData));
        $adminMailConfiguration->setFrom($type->getNotifyFromMailAddress($formData));
        $adminMailConfiguration->setTo($type->getNotifyToMailAddress($formData));
        $adminMailConfiguration->setReplyTo($type->getNotifyReplyToMailAddress($formData));
        $adminMailConfiguration->setAddAttachments($type->getNotifySendAttachments($formData));
        $adminMailConfiguration->setTemplate($type->getNotifyMail($formData));
        $adminMailConfiguration->setTemplateAttributes($attributes);

        return $adminMailConfiguration;
    }
Build admin mail configuration by type.

@param AbstractType $type
@param mixed $formData
@param string $locale
@param array $attributes

@return MailConfiguration|null