Skip to main content
Version: 2024.4

Installation

Minimum Requirements

  • Pimcore >= 11

Installation Process

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 | ✔ | ✔ | ❌ | ✔ | ❌ |
+---------------------------------+---------+-----------+----+-----+-----+

Config options

#### SYMFONY MAILER TRANSPORTS
framework:
mailer:
enabled: true
transports:
pimcore_newsletter: smtp://user:pass@smtp.example.com: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: 'han.solo@pimcore.com'
return:
name: 'Luke Skywalker'
email: 'luke.skywalker@pimcore.com'
debug:
email_addresses: 'han.solo@pimcore.com,luke.skywalker@pimcore.com'
use_specific: true
default_url_prefix: 'https://my-host.com'

Uninstallation

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

Best Practice and Example

See Newsletter Config for a complete example and how to set up your newsletter.

Document Types

This bundle introduces a new document type:

TypeDescription
NewsletterLike an email but specialized for newsletter

Pimcore Twig Extensions

This bundle also adds a new twig extension. For more information checkout the main documentation

TestDescription
pimcore_document_newsletterChecks if object is instanceof Newsletter