PHP code example of cliffparnitzky / birthday-mailer
1. Go to this page and download the library: Download cliffparnitzky/birthday-mailer 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/ */
cliffparnitzky / birthday-mailer example snippets
// config.php
$GLOBALS['TL_HOOKS']['birthdayMailerAbortSendMail'][] = array('MyClass', 'myAbortSendMail');
// MyClass.php
class MyClass
{
public function myAbortSendMail($birthdayChildConfig, $blnAbortSendMail)
{
if ($blnAbortSendMail !== TRUE && $birthdayChildConfig->id == 1)
{
$blnAbortSendMail = true;
$this->log('SEnding birthday mail to member with id "1" was aborted.', 'MyClass myAbortSendMail()', TL_INFO);
}
return $blnAbortSendMail;
}
}