function($c) { $email = new EmailConfiguration( EmailConfiguration::AUTH_TYPE_SMTP ); $email->smtpHost = getenv('SMTP_HOSTNAME'); $email->smtpPort = getenv('SMTP_PORT'); $email->smtpUsername = getenv('SMTP_USERNAME'); $email->smtpPassword = getenv('SMTP_PASSWORD'); $email->smtpUseTLS = getenv('SMTP_TLS'); $email->toAddress = getenv("TO_EMAIL"); $email->fromAddress = getenv("FROM_EMAIL"); $email->fromName = getenv("FROM_NAME"); return $email; }, MailerInterface::class => autowire(SymfonyMailer::class), ];