<?php
namespace Slivki\Controller;
use Doctrine\ORM\EntityManagerInterface;
use Slivki\Dao\Beauty\MasterDaoInterface;
use Slivki\Enum\Bonus\Bonus;
use Slivki\Message\Command\Bonus\AddBonusCommand;
use Slivki\Repository\Comment\CommentRepositoryInterface;
use Slivki\Services\Mailer;
use Slivki\Services\MeOnMap\GetCategoriesWithGeoLocationsResponseCacheService;
use Slivki\Services\Offer\OfferCacheService;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Bundle\TwigBundle\DependencyInjection\Configurator\EnvironmentConfigurator;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\KernelInterface;
use Symfony\Component\Messenger\MessageBusInterface;
use Symfony\Component\Routing\Annotation\Route;
final class TestAction extends AbstractController
{
public function __construct()
{
}
/** @Route("/atest") */
public function __invoke(Mailer $mailer): Response
{
$html = $this->renderView('Slivki/emails/test.html.twig');
$mail = $mailer->createMessage('event test', $html, 'html');
$mail->setFrom('info@slivki.by');
//$mail->setTo('igoradv@gmail.com');
$mail->setTo('igor.tovkun@hotmail.com');
$mailer->send($mail);
die();
return $this->render('empty.html.twig');
}
}