zwo3/newsletter_subscribe

Subscribe / Unsubscribe Extension (e.g. for Newsletter), depends on tt_address

v2.2.0 2020-10-14 07:32 UTC

This package is auto-updated.

Last update: 2020-11-14 07:56:14 UTC


README

  • Subcribe for Newsletters for TYPO3 >= 9.5
  • Depends on tt_address

What does it do?

  • Provides a plugin to double optin subscribe
  • Provides a plugin to double optin unsubscribe
  • Provides field in tt_address to generate unsubscribe link in direct_mail mailings

Install

  • Install via extension manager or
  • Install via composer
  • Include static template

Configuration

Parameter Description Type, Validation Default
dataProtectionPage Uid of page with information about the data protection policy integer 1
adminEmail Email address in confirmation mails string, email, mandatory admin.name@domain.tld
adminName Name in confirmation mails string Your admin Name
newsLetterName Title of the newsletter / subscription list string Newsletter
showFields Additional fields to show in subscription form (gender,firstName,lastName,company).
email and dataProtection are always shown.
string null
subscribePageUid Uid of page with subscription form. Used for links in templates and mails. string null
sendAdminInfo whether the admin should get an info mail on every confirmation bool 0
mailTemplateRootPath path to the mail templates, root for different languages (e.g. en, de, dk) string EXT:newsletter_subscribe/Resources/Private/Templates/Mail/
overrideFlexformSettingsIfEmpty Fields, which should be overridden from typosrcipt if left blank in the flexform (like in tx_news, thx to Georg Ringer!). string adminEmail, adminName, subscribePageUid, mailTemplateRootPath, dataProtectionPage, adminName, showFields, newsletterName

Site config (for nicer link in subscriber mails)

routeEnhancers:
  UnSubscribe:
    type: Extbase
    extension: NewsletterSubscribe
    plugin: Unsubscribe
    routes:
      -
        routePath: '/unsubscribe/{unsubscribe}/{uid}'
        _controller: 'Subscribe::unsubscribe'
        _arguments:
          unsubscribe: subscriptionHash
          uid: uid
  Subscribe:
    type: Extbase
    extension: NewsletterSubscribe
    plugin: Subscribe
    routes:
      -
        routePath: '/confirm/{confirm}/{uid}'
        _controller: 'Subscribe::doConfirm'
        _arguments:
          confirm: subscriptionHash
          uid: uid
      -
        routePath: '/undosubscribe/{unsubscribe}/{uid}'
        _controller: 'Subscribe::undosubscribe'
        _arguments:
          unsubscribe: subscriptionHash
          uid: uid

Unsubscribe link in direkt mail

  1. First add the field subscription_hash to the fields of direct mail in the extension configuration of direct mail: direct mail configuration
  2. Add the link in your mail template:
    <a href="http://www.domain.tld/page/undosubscribe/###USER_subscription_hash###/###USER_uid###">unsubscribe</a> where this undosubscribe/###USER_subscription_hash###/###USER_uid###" is the important part.
    Note: The subscribe plugin must be inserted on the page "page" in that url.

To do

  • write a scheduler task to remove unconfirmed addresses (after some time)
  • creating ajax submit