2017 © Pedro Peláez
 

symfony-bundle newsletter-bundle

Newsletter bundle for symfony 2

image

usn/newsletter-bundle

Newsletter bundle for symfony 2

  • Tuesday, December 15, 2015
  • by usn
  • Repository
  • 2 Watchers
  • 0 Stars
  • 78 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 4 % Grown

The README.md

newsletterBundle

Newsletter bundle for Symfony 2., (*1)

Installation

Step 1: Download the Bundle

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:, (*2)

$ composer require usn/newsletter-bundle

This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation., (*3)

Step 2: Enable the Bundle

Then, enable the bundle by adding the following line in the app/AppKernel.php file of your project:, (*4)

<?php
// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...

            new Usn\NewsletterBundle\UsnNewsletterBundle(),
        );

        // ...
    }

    // ...
}

Step 3: Update your database schema

php app/console doctrine:schema:update --force

Step 4: Include javascript

This bundle requires jquery. Include it in the layout template., (*5)

Run the command to install js assets, (*6)

$ php app/console assets:install --symlink

Include the main.js file as below., (*7)

  <script src="{{ asset('bundles/usnnewsletter/js/main.js') }}"></script>

Step 5: update the routing file

#app/config/routing.yml

usn_newsletter:
    resource: "@UsnNewsletterBundle/Resources/config/routing.yml"

Step 6: setup confirmation email parameters

These parameters are used when sending the confirmation email after a user register it email address., (*8)

 #app/config/parameters.yml

 parameters:   

    confirmation_email_subject: Your auto-reply email subject
    newsletter_from_address: 'no-reply@yourdomain.com'
    newsletter_from_name: 'Sender name'

The confirmation email templates are located herer:, (*9)

Resources/views/Default/comfirmation_email.html.twig
Resources/views/Default/comfirmation_email.txt.twig

How to include the newletter form into a template.

{{render(controller('UsnNewsletterBundle:Default:subscribe'))}}

Get a report on the number of subscribers by emails

The following command will send by email the number of subscribers:, (*10)

php app/console usn:newsletter:report <recipient email>

The Versions

15/12 2015

dev-master

9999999-dev

Newsletter bundle for symfony 2

  Sources   Download

The Requires

  • php >=5.3.0

 

30/11 2015

v0.2

0.2.0.0

Newsletter bundle for symfony 2

  Sources   Download

The Requires

  • php >=5.3.0

 

30/11 2015

v0.1

0.1.0.0

Newsletter bundle for symfony 2

  Sources   Download

The Requires

  • php >=5.3.0

 

21/11 2014

0.0.3

0.0.3.0

Newsletter bundle for symfony 2

  Sources   Download

The Requires

  • php >=5.3.0

 

21/11 2014

v0.0.2

0.0.2.0

Newsletter bundle for symfony 2

  Sources   Download

The Requires

  • php >=5.3.0