当用户注册时,我正在尝试向我的网站管理员发送第二封电子邮件。
我制作了一个发送电子邮件的 postHook 片段,但它没有工作 - 注册过程按预期工作,但我没有收到来自钩子的第二封电子邮件。
在测试中,我将钩子从 postHook 设置为 preHook 并再次尝试 - 这次表单根本没有处理 - 没有创建新用户,也没有发送激活电子邮件。它甚至没有重定向到提交的ResourceId。
因此,我删除了 preHook Snippet 中的所有内容,除了return true;
并再次尝试 - 仍然没有。
看来登录根本不会运行任何钩子。我不知道为什么。
任何人都可以提出任何修复建议吗?
我的注册片段是:
[[!Register?
&submitVar=`registerbtn`
&activationResourceId=`19`
&activationEmailTpl=`lgnActivateEmailTpl`
&activationEmailSubject=`Thanks for Registering!`
&submittedResourceId=`23`
&usergroups=`2`
&validate=`nospam:blank,
username:required:minLength=^6^,
password:required:minLength=^6^,
password_confirm:password_confirm=^password^,
fullname:required,
email:required:email`
&preHooks=`adminEmailHook`
]]