- Pimcore >= 11
Install bundle via composer:
composer require pimcore/newsletter-bundle
Enable bundle in config/bundles.php
:
return [
...
Pimcore\Bundle\NewsletterBundle\PimcoreNewsletterBundle::class => ['all' => true],
...
];
Install bundle via console:
php bin/console pimcore:bundle:install PimcoreNewsletterBundle
Check if the bundle has been installed:
php bin/console pimcore:bundle:list
+---------------------------------+---------+-----------+----+-----+-----+
| Bundle | Enabled | Installed | I? | UI? | UP? |
+---------------------------------+---------+-----------+----+-----+-----+
| PimcoreNewsletterBundle | ✔ | ✔ | ❌ | ✔ | ❌ |
+---------------------------------+---------+-----------+----+-----+-----+
#### SYMFONY MAILER TRANSPORTS
framework:
mailer:
enabled: true
transports:
pimcore_newsletter: smtp://user:[email protected]:port
messenger:
routing:
'Pimcore\Bundle\NewsletterBundle\Messenger\SendNewsletterMessage': pimcore_core
pimcore_newsletter:
source_adapters:
defaultAdapter: pimcore_newsletter.document.newsletter.factory.default
csvList: pimcore_newsletter.document.newsletter.factory.csv
sender:
name: 'Han Solo'
email: '[email protected]'
return:
name: 'Luke Skywalker'
email: '[email protected]'
debug:
email_addresses: '[email protected],[email protected]'
use_specific: true
default_url_prefix: 'https://my-host.com'
Uninstalling the bundle does not clean up newsletter
documents only the predefined document types. Before uninstalling make sure to remove or archive all dependent documents.
You can also use the following command to clean up you database. Create a backup before executing the command. All data will be lost.
bin/console pimcore:document:cleanup newsletter
See Newsletter for a complete example and how to set up your newsletter.
This bundle introduces a new document type:
Type | Description |
---|---|
Newsletter | Like an email but specialized for newsletter |
This bundle also adds a new twig extension. For more information checkout the main documentation
Test | Description |
---|---|
pimcore_document_newsletter |
Checks if object is instanceof Newsletter |