Giter VIP home page Giter VIP logo

direct_mail's Introduction

Direct Mail

The »Direct Mail« extension implements an advanced newsletter mailer system for the TYPO3 CMS. This extension provides not only a system for sending a newsletter from TYPO3 CMS, but also personalizing it and collect some statistics.

The extension builds a newsletter based on a TYPO3 page, so that you can create newsletter layout the same way you create a website layout. It also lets editors select between different recipient groups for each newsletter.

The extension provides several scheduler tasks to let integrators control when and how much newsletters are send, and to analyze bounce mails.

Installation

Documentation and support

Contributing

You can contribute to this project by creating issues and/or sending pull requests.

  1. Create an issue or look for existing ones

  2. Fork the repository on Github

  3. Clone the repository, create a new branch based on the "develop" branch

  4. Make your changes, commit your changes to your fork

    In your commit message refer to the issue number if there is already one, e.g. [BUGFIX] Short description of fix (resolves #4711)

    PS: here are some hints on How to write the perfect pull request

  5. Submit a pull request using GitHub

  6. Wait for check backs or the final merge

direct_mail's People

Contributors

3l73 avatar bastianbalthasarbux avatar bluechipzellamsee avatar chesio avatar fabtho avatar frans-beech-it avatar fsaris avatar georgringer avatar jokumer avatar joneppie avatar kartolo avatar knusperpixel avatar kraftb avatar lorenzulrich avatar majernik avatar malteriechmann avatar mh0rst avatar neufeind avatar nostrabramus avatar patta avatar pixelbrackets avatar responseinformationsdesign avatar rsternec avatar ruudsilvrants avatar schlumminator avatar utrotzek avatar villamarianne avatar vzz3 avatar webian avatar xperseguers avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

direct_mail's Issues

[ENHANCEMENT] Make jumpurl for dmailerping less error-prone

This is really only a nice-to-have:

If the dmailerping.gif (statistics) is included with the domain prefixed, e.g.:
<img src="https://example.example/typo3conf/ext/direct_mail/Resources/Public/Icons/dmailerping.gif" width="1" height="1" dmailerping="1" do_not_embed="1" alt="" border="0" />

You will notice an error in TYPO3 backend (Logging module), because Hook/JumpurlController will throw an exception.

What happens?
The above results in an URL in the mailing like this:
https://example.example/newsletter-test/?mid=6&aC=d0eff497&jumpurl=https://example.example/typo3conf/ext/direct_mail/Resources/Public/Icons/dmailerping.gif

$checkPath then, around line 154, gets something like that:
/path/to/vhosts/example.example/htdocs/https://example.example/typo3conf/ext/direct_mail/Resources/Public/Icons/dmailerping.gif

And this is, obviously, not a valid path, and thus "not allowed" and results in forementioned exception.

Maybe, instead of fixing that code here, it would be better to check for the complete URI when generating the mail content and correcting the URL already at that point.

Testmail given an error

(1/1) Swift_RfcComplianceException
Address in mailbox given [] does not comply with RFC 2822, 3.6.2.

Swift_RfcComplianceException

If I send directly from the mailing list of direct-mail I get this error:

(1/1) Swift_RfcComplianceException
Address in mailbox given [] does not comply with RFC 2822, 3.6.2.

Backend Module ArgumentCountError

Branch: TYPO3_9
Composer mode
TYPO3 9.5.11

(1/1) ArgumentCountError
Too few arguments to function DirectMailTeam\DirectMail\Module\Statistics::mainAction(), 1 passed and exactly 2 expected

in ...\packages\direct_mail\Classes\Module\Statistics.php line 170

     * @param ResponseInterface $response The reponse object sent to the backend
     *
     * @return ResponseInterface Return the response object
     */
    public function mainAction(ServerRequestInterface $request, ResponseInterface $response)
    {
        $this->getLanguageService()->includeLLFile('EXT:direct_mail/Resources/Private/Language/locallang_mod2-6.xlf');
        $this->getLanguageService()->includeLLFile('EXT:direct_mail/Resources/Private/Language/locallang_csh_sysdmail.xlf');

at DirectMailTeam\DirectMail\Module\Statistics->mainAction(object(TYPO3\CMS\Core\Http\ServerRequest))
at call_user_func_array(array(object(DirectMailTeam\DirectMail\Module\Statistics), 'mainAction'), array(object(TYPO3\CMS\Core\Http\ServerRequest)))

jumpurl processing for email links

If jumperURL_useId is off, the jumpUrl target is added as links to the newsletter base address. This works for http:// and https:// links. For mailto: links, jumpurl processing fails as the JumpurlController does not add the juHash in this case.

To fix this, the following lines should be inserted after

} elseif (GeneralUtility::isValidUrl($jumpurl) && preg_match('#^(http://|https://)#', $jumpurl)) {
// Also allow jumpurl to be a valid URL
GeneralUtility::_GETset(GeneralUtility::hmac($jumpurl, 'jumpurl'), 'juHash');
$responseType = -1;
}

                } elseif (GeneralUtility::validEmail(substr($jumpurl,7)) && preg_match('#^(mailto:)#', $jumpurl)) {
                    // Also allow jumpurl to be a valid mailto link
                    GeneralUtility::_GETset(GeneralUtility::hmac($jumpurl, 'jumpurl'), 'juHash');
                    $responseType = -1;
                }

createDirectMailRecordFromPage->pageRecordOverlay

The condition if (is_array($pageRecordOverlay)) is always false, because fetchColumn(0) is used to fetch the title. fetchColumn(0) returns the first column of the next row as (in this case) string.

So the condition has to be if ($pageRecordOverlay) or if (is_string($pageRecordOverlay)) and the assignment has to be $pageRecord['title'] = $pageRecordOverlay; (not $pageRecord['title'] = $pageRecordOverlay['title'];)

Internal pages not listet

Internal pages in the selected SysFolder are not listet/shown in the direct mail wizard.

TYPO3 9.5.13
PHP 7.3.13
Composer mode
Branch TYPO3_9

DirectMailUtility->getUrlBase

The function getFullUrlsForDirectMailRecord uses the function getUrlBase to fetch the base url, the plainTextUrl and the htmlUrl.

$row['page'] is the page in the default language. $row['HTMLParams'] and $row['plainParams'] contains the language param (e.g. &L=1). getUrlBase returns for htmlUrl the baseURL appended with the HTMLParams (e.g. www.test.at/test?&L=1

But in TYPO3 9.5 the language is part of the baseURL (e.g. www.test.at/en or en.test.at) configured in Sites module in the backend and not a parameter in the url. So fetching the content from an localized page fails.

I dont know if it´is helpful. But i have modified the getFullUrlsForDirectMailRecord function in a 5.x branch before to make it compatible with TYPO3 9.5. See attached code:
directmail.txt

direct_mail 6.0.0-dev Error

With the new Version of direct_mail 6.0.0-dev Error i have errors in Frontend and in the Backend Tools in Typo 9.5.11

Frontend Error:

(1/1) #1294585866 InvalidArgumentException
No class named DirectMailTeam\DirectMail\Hooks\JumpurlController

Backend Error:

(1/1) Error
Class 'DirectMailTeam\DirectMail\Module\Dmail' not found

(1/1) Error
Class 'DirectMailTeam\DirectMail\Module\RecipientList' not found

(1/1) Error
Class 'DirectMailTeam\DirectMail\Module\Statistics' not found

1/1) Error
Class 'DirectMailTeam\DirectMail\Module\MailerEngine' not found

(1/1) Error
Class 'DirectMailTeam\DirectMail\Module\Configuration' not found

PHP error on FlashMessageRenderer call in Directmail module

Directmail module for creating newsletter to send throws error, when selecting a test recipient from list in step 4.

Argument 1 passed to DirectMailTeam\DirectMail\Utility\FlashMessageRenderer::render() must be an instance of TYPO3\CMS\Core\Messaging\FlashMessage, null given, called in /www/typo3conf/ext/direct_mail/Classes/Module/Dmail.php on line 1110

TYPO3 10.4.6 LTS -> Translated Mails

In DirectMailUtility.php

if (strpos(VersionNumberUtility::getNumericTypo3Version(), '9') === 0) {

have to be

if (VersionNumberUtility::convertVersionNumberToInteger(VersionNumberUtility::getNumericTypo3Version()) >= VersionNumberUtility::convertVersionNumberToInteger('9')) {

to use 'page' instead of 'pages_language_overlay' in TYPO3 v10 too.

Redundant parameter in jumpurl link

The fix for issue #16 generates correct base urls for the links in the email. With jumpurl enabled, these links get extended by several parameters. As the base url is now the direct url of the newsletter page, adding an additional "id" parameter for the jumpurl links is not necessary.

Class DirectMailUtility can be changed in method "fetchUrlContentsForDirectMailRecord" from

$htmlmail->jumperURL_prefix = $urlBase .
'?id=' . $row['page'] .
(intval($params['jumpurl_tracking_privacy']) ? '' : '&rid=###SYS_TABLE_NAME###_###USER_uid###') .
'&mid=###SYS_MAIL_ID###' .
'&aC=###SYS_AUTHCODE###' .
'&jumpurl=';

to

            $htmlmail->jumperURL_prefix = $urlBase .
                '?mid=###SYS_MAIL_ID###' .
                (intval($params['jumpurl_tracking_privacy']) ? '' : '&rid=###SYS_TABLE_NAME###_###USER_uid###') .
                '&aC=###SYS_AUTHCODE###' .
                '&jumpurl=';

Display recipient lists broken

When using TYPO3_9 branch with the latest security updates, showing the recipent lists causes an error.

The reason is that DirectMailUtility::getSpecialQueryIdList tries to do DB selection via $GLOBALS['TYPO3_DB'].

Usage of $GLOBALS['TYPO3_DB'] was introduced with commit d735416 ("Adopt commit 'e675de9' into TYPO3_9")

Original version from commit e675de9 ("[Security] respect user restriction on query generator") is working in Typo3 V9 context.

I suggest to revert d735416

Recipient list doesn't respect multiple source folders

When adding a second folder of tt_address addresses as source folder in a recipient list, only the first added folder is respected in the sending process (and counted in the overview in the menu "recipient list"). It seems not to make a difference if the folder is on the same page level as the first folder or if it is a sub folder of the first folder.

cvs import

cvs import in recipient list given an error
(1/1) #1476107295 TYPO3\CMS\Core\Error\Exception
PHP Warning: strpos() expects parameter 3 to be integer, string given in /var/www/vhosts/midomain.at/httpdocs/Typo9/Source/Extensions/direct-mail/Classes/Importer.php line 928

JumpUrl v8.0 incompatibility with TYPO3_9 version

Within develop of TYPO3 CMS v9.5 compatible version of direct_mail v6.0,
the required extension friendsoftypo3/jumpurl is compatible with v7.8 only. Update to v8.0 breaks for links.
#1359987599 Exception The calculated Jump URL hash ("juHash") did not match the submitted "juHash" query parameter.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.