zwo3/newsletter_subscribe

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

3.2.3 2021-03-13 17:55 UTC

README

  • Subcribe for Newsletters for TYPO3 >= 9.5
  • Depends on tt_address
  • Scheduler Task to delete unconfirmed subscribers after a while (since v3.1.0)

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
useSimpleSpamPrevention whether there should be a simple spam preventition using javascript and session (with session cookie) bool 1
spamTimeout time in seconds to wait before form gets rendered again if spam check fails int 5
useHCaptcha whether hCaptcha (https://www.hcaptcha.com/) should be used, needs further configuration bool 0
hCaptchaSiteKey hCaptcha site key, only if hCaptcha is used string 10000000-ffff-ffff-ffff-000000000001
hCaptchaSecretKey hCaptcha secret key, only if hCaptcha is used string 0x0000000000000000000000000000000000000000
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/
mailLayoutRootPath path to the mail layouts used from the templates string EXT:core/Resources/Private/Layouts/
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

  • creating ajax submit