Skip to content

Latest commit

 

History

History
97 lines (75 loc) · 3.14 KB

01_Installation.md

File metadata and controls

97 lines (75 loc) · 3.14 KB

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:[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'    
    

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 for a complete example and how to set up your newsletter.

Document Types

This bundle introduces a new document type:

Type Description
Newsletter Like an email but specialized for newsletter

Pimcore Twig Extensions

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