sputnik/newsletter-bundle

This package is abandoned and no longer maintained. No replacement package was suggested.
There is no license information available for the latest version (v0.1.0) of this package.

Provides subscriber functionality for various newsletters/subscription lists.

v0.1.0 2013-08-21 13:17 UTC

This package is not auto-updated.

Last update: 2018-09-04 18:39:32 UTC


README

SputnikNewsletterBundle provides subscription functionality for various newsletter/subscription lists. This bundle was inspired by wonderful Stampie library as well as used as a foundation for current one.

Main features

  • Configuration of multiple subscribers.
  • Foundation for multiple subscriber types (at the moment only CampaignMonitor is supported).
  • Console command for manual email subscription.

Note: There is a sample Sandbox application with Sputnik bundles installed and configured - https://github.com/sputnik-project/sandbox.

Build Status

Quick example

Service usage

use Sputnik\Bundle\NewsletterBundle\Message\Subscription;

class MyController extends Controller
{
    public function subscribeAction($email)
    {
        try {
            $this->get('sputnik_newsletter.campaign_monitor')->subscribe(new Subscription($email));
        } catch (\RuntimeException $e) {
            $e->getMessage(); // API message
            $e->getPrevious()->getMessage(); // HTTP error
            $e->getPrevious()->getStatusCode(); // HTTP error code
            
            // Return erroneous response here.
        }
        
        // Return successful response here.
    }
}

Documentation

Documentation can be found in Resources/doc. You can start with installation instructions.

API documentation.

Resources