1
pimps
Hack to Send Diferent Emails for each Group
  • 2007/10/19 22:12

  • pimps

  • Just popping in

  • Posts: 9

  • Since: 2007/1/12


Hi Everybody...

Sorry for my bad english!

Well, the TheRpLima created a great hack that make possible the user choice, in registration form, wich group that he will be.

The code is in this tread in XOOPS TOTAL (in portuguese)

Well, now we're trying to make that can be possible send a diferent email for wich group that the user choice in the registration

I think this be possible if we add a IF in the part of the code that send the email like I show:



if ($xoopsConfigUser['activation_type'] == 0) {
$xoopsMailer =& getMailer();
$xoopsMailer->useMail();

If the group choice is GROUP1 than

$xoopsMailer->setTemplate('register1.tpl');

Else, If the group choice is GROUP2 than

$xoopsMailer->setTemplate('register2.tpl');

$xoopsMailer->assign('SITENAME', $xoopsConfig['sitename']);
$xoopsMailer->assign('ADMINMAIL', $xoopsConfig['adminmail']);
$xoopsMailer->assign('SITEURL', XOOPS_URL."/");
$xoopsMailer->setToUsers(new XoopsUser($newid));
$xoopsMailer->setFromEmail($xoopsConfig['adminmail']);
$xoopsMailer->setFromName($xoopsConfig['sitename']);
$xoopsMailer->setSubject(sprintf(_US_USERKEYFOR, $uname));
if ( !$xoopsMailer->send() ) {
echo _US_YOURREGMAILNG;
} else {
echo _US_YOURREGISTERED;
}



this code is the REGISTER.PHP file between lines 226 to 241 with literal alteracions in bold.

Is that possible?

Login

Who's Online

396 user(s) are online (272 user(s) are browsing Support Forums)


Members: 0


Guests: 396


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits