sputnik / newsletter-bundle
Provides subscriber functionality for various newsletters/subscription lists.
Installs: 241
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 3
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.3.3
- henrikbjorn/stampie: ~0.7
- symfony/framework-bundle: ~2.3
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.
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.