jweiland/mail-link-fixer

Mail Link Fixer (EXT:mail_link_fixer) - CLI command to fix javascript:linkTo_UnCryptMailto() hrefs in RTE Fields

Maintainers

Package info

github.com/jweiland-net/mail_link_fixer

Homepage

Type:typo3-cms-extension

pkg:composer/jweiland/mail-link-fixer

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-main 2026-06-05 10:01 UTC

This package is auto-updated.

Last update: 2026-06-05 10:09:17 UTC


README

Packagist Latest Stable Version Total Downloads Monthly Downloads TYPO3 13.4 TYPO3 14.3

Build Status

This extension provides a CLI command to migrate legacy javascript:linkTo_UnCryptMailto() links in the database into standard mailto: links, allowing modern TYPO3 versions (v12/v13) to natively handle frontend spam protection.

1 Features

  • Safely reverses legacy Caesar-cipher encrypted email links directly in the database.
  • Rebuilds broken <a href="javascript:..."> tags into standard <a href="mailto:..."> tags.
  • Dynamically scans the global TYPO3 TCA to find and process all Rich Text (RTE) and standard text fields.
  • Includes a robust --dry-run mode to preview changes without altering database records.

2 Usage

2.1 Installation

Installation using Composer

The recommended way to install the extension is using Composer.

Run the following command within your Composer based TYPO3 project:

composer require jweiland/mail-link-fixer

2.2 Command Usage

The extension registers the following CLI command via the TYPO3 Console:

vendor/bin/typo3 mail_link_fixer:fix-spam-email [options]

Options

Option Short Description
--dry-run Preview changes without writing to the database.
--uid=<UID> Process only the tt_content record with this UID.
--table=<table> -t Specific table to process (default: tt_content).
--field=<field> -f Specific field to process (default: bodytext).
--all-rte Scan all tables and fields in TCA configured with enableRichtext=true.

Examples

Preview all changes without touching the database:

vendor/bin/typo3 mail_link_fixer:fix-spam-email --dry-run

Fix a single record by UID:

vendor/bin/typo3 mail_link_fixer:fix-spam-email --uid=42

Process a specific table and field:

vendor/bin/typo3 mail_link_fixer:fix-spam-email --table=tx_myext_domain_model_news --field=bodytext

Scan and fix all RTE fields across the entire TCA:

vendor/bin/typo3 mail_link_fixer:fix-spam-email --all-rte

Combine --all-rte with --dry-run for a safe full-site preview:

vendor/bin/typo3 mail_link_fixer:fix-spam-email --all-rte --dry-run

Add -v for verbose output that shows the number of replacements per record:

vendor/bin/typo3 mail_link_fixer:fix-spam-email --all-rte -v