forked from xoopscube/legacy
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[user] add delegate points before xoopsmailer->send() with
xoopsmailer
- sample preload (html/preload/UserPreSendMail.class.php) ```php <?php class UserPreSendMail extends XCube_ActionFilter { function postFilter() { $this->mRoot->mDelegateManager->add('Legacy.Event.RegistUser.SendMail' , array($this ,'preSendMail')); } function preSendMail(&$mailer, $action) { /* COMMON PROCESS */ /* EDIT SUBJECT */ //$subject = $mailer->getVar('subject'); //$mailer->setSubject('['.$action.'] ' . $subject); /* CHANGE MAIL FROM */ //$mailer->setFromEmail('example@example.com'); //$mailer->setFromName('XOOPS Cube Legacy Site'); /* PROCESS OF EACH ACTION */ switch($action) { case 'LostPass1' : break; case 'LostPass2' : break; case 'Activated' : break; case 'Register' : /* CHANGE TEMPLATE */ //$mailer->setTemplate('register_custom.tpl'); break; case 'AdminActivate' : break; case 'Notify' : break; } } } ```
- Loading branch information
Showing
3 changed files
with
5 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters