PHP code example of craffft / contao-accountmail

1. Go to this page and download the library: Download craffft/contao-accountmail library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

craffft / contao-accountmail example snippets


$GLOBALS['TL_HOOKS']['replaceAccountMailParameters'][] = array('Hooks', 'replaceAccountMailParameters');

/**
 * @param $strType
 * @param $arrParameters
 * @param $dc
 * @return array
 */
public function replaceAccountMailParameters($strType, $arrParameters, $dc)
{
    switch ($strType) {
        case 'emailNewMember':
            // Do anything
            break;

        case 'emailChangedMemberPassword':
            // Do anything
            break;

        case 'emailNewUser':
            // Do anything
            break;

        case 'emailChangedUserPassword':
            // Do anything
            break;
    }

    return $arrParameters;
}