Hi Susan,
thank you but this is exactly
what is not working here and I don't have any clue why Register activation does not do the emailing job and this is why I was trying to
find another way to send the activation email with a posthook!
As I posted : "nothing is sent (no trace of anything in my server's mailog nor in modx error log)" with the basic Register call:
This one (without posthook first then with my posthook):
[[!Register?
&submitVar=`registerbtn`
&activation=`1`
&activationEmailTpl=`lgnActivateEmailTpl`
&activationEmailSubject=`Please activate your account!`
&activationResourceId=`54`
&submittedResourceId=`53`
&useExtended=`1`
&emailField=`ORDER_email`
&usergroups=`Members`
&validate=`nospam:blank,
username:required:minLength=^6^,
password:required:minLength=^6^,
password_confirm:password_confirm=^password^,
ORDER_fname:required
`
&placeholderPrefix=`reg.`
&postHooks=`RegisterHookEmail`
]]
Now in mu posthook I changed the $message création like this:
$message = $modx->getChunk('lgnActivateEmailTpl',$hook->getValues() );
This solve my issue regarding populating the placeholders coming from the register form but of course not for the +confirmurl.
So How to get the confirm url in a posthook ?