A simple newsletter bundle for Symfony applications.
- Symfony 6
- Symfony 7.4 / 8.0
Clone the repository into your Symfony project and register the bundle:
return [
App\Bundle\NewsletterBundle\NewsletterBundle::class => ['all' => true],
];Import the bundle routes:
newsletter_bundle:
resource: '@NewsletterBundle/config/routes.yaml'Register the bundle templates:
twig:
paths:
'%kernel.project_dir%/src/Bundle/NewsletterBundle/templates': NewsletterBundleSet the contact email:
parameters:
contact_email: contact@example.comPOST /newsletter/subscribeGET /newsletter/confirmGET /newsletter/unsubscribePOST /admin/newsletter/send