<?php

declare(strict_types=1);

/*
 * This file is part of SolidInvoice project.
 *
 * (c) 2013-2017 Pierre du Plessis <info@customscripts.co.za>
 *
 * This source file is subject to the MIT license that is bundled
 * with this source code in the file LICENSE.
 */

namespace SolidInvoice\MailerBundle\Form\Type\TransportConfig;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\PasswordType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Validator\Constraints;

final class SesTransportConfigType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options): void
    {
        $builder->add(
            'accessKey',
            null,
            [
                'constraints' => new Constraints\NotBlank(['groups' => 'amazon_ses']),
            ]
        );

        $builder->add(
            'accessSecret',
            PasswordType::class,
            [
                'constraints' => new Constraints\Notblank(['groups' => ['amazon_ses']]),
            ]
        );
    }
}

<?php

declare(strict_types=1);

/*
 * This file is part of SolidInvoice project.
 *
 * (c) 2013-2017 Pierre du Plessis <info@customscripts.co.za>
 *
 * This source file is subject to the MIT license that is bundled
 * with this source code in the file LICENSE.
 */

namespace SolidInvoice\MailerBundle\Form\Type\TransportConfig;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\PasswordType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Validator\Constraints;

final class SesTransportConfigType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options): void
    {
        $builder->add(
            'accessKey',
            null,
            [
                'constraints' => new Constraints\NotBlank(['groups' => 'amazon_ses']),
            ]
        );

        $builder->add(
            'accessSecret',
            PasswordType::class,
            [
                'constraints' => new Constraints\Notblank(['groups' => ['amazon_ses']]),
            ]
        );

        $builder->add(
            'region',
            null,
            [
                'attr' => [
                    'placeholder' => 'eu-west-1',
                ],
            ]
        );
    }
}

Add region for SES mail config
Add region for SES mail config
