cliffparnitzky/birthday-mailer

向当天过生日的所有成员发送生日电子邮件。

安装: 277

依赖项: 0

建议者: 0

安全: 0

星标: 0

关注者: 3

分支: 3

类型:contao-module

1.3.5 2018-10-30 18:52 UTC

This package is auto-updated.

Last update: 2024-09-21 21:54:58 UTC


README

Latest Version on Packagist Installations via composer per month Installations via composer total

Contao 扩展: BirthdayMailer

向当天过生日的所有成员发送生日电子邮件。

安装

使用 composer 安装扩展: cliffparnitzky/birthday-mailer

如果您希望手动安装,请在此处下载最新版本:https://github.com/cliffparnitzky/BirthdayMailer/releases

跟踪器

https://github.com/cliffparnitzky/BirthdayMailer/issues

兼容性

  • Contao 版本 >= 3.2.0 ... < 3.6.0
  • Contao 版本 >= 4.4.0

依赖

本扩展依赖于以下扩展

插入标签

{{birthdaychild::*}} ... This tag returns all the values of the current member (replace * with any attribute of the member, e.g. firstname or company, the attribute password is not allowed).
{{birthdaychild::salutation}} ... This tag returns the salutation of the member (depending on gender).
{{birthdaychild::name}} ... This tag returns first and last name of the member.
{{birthdaychild::groupname}} ... This tag returns the name of the member group of the current configuration.
{{birthdaychild::age}} ... This tag returns the age of the member.
{{birthdaymailer::email}} ... This tag returns the e-mail the configured sender.
{{birthdaymailer::name}} ... This tag returns the name of the configured sender.

钩子

birthdayMailerAbortSendMail

"birthdayMailerAbortSendMail" 钩子会在发送生日邮件前触发,以便检查是否应该发送生日邮件。因此可以为每个生日儿童进行自定义检查。它传递 $birthdayChildConfig(当前生日儿童的配置)和 $blnAbortSendMail(当前值,如果应该中断发送)。它期望返回布尔值。

// 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;
	}
}