First of all I use CMSMS 1.10.3 and I use this UDT with event handler "UserAddPost"
http://wiki.cmsmadesimple.org/index.php ... in_Console
But it gives a server error when adding a new user to the admin panel.
I have so fare figured out that this marked out stop the server error
Code: Select all
if($newuser->email != "" && validate_email($newuser->email)){
$cmsmailer = $this->GetModuleInstance('CMSMailer');
$cmsmailer->AddAddress($newuser->email);
$cmsmailer->SetBody($bodytext);
$cmsmailer->IsHTML(false);
$cmsmailer->SetSubject($sitename.' User Account Information');
$cmsmailer->Send();
}
Code: Select all
$cmsmailer = $this->GetModuleInstance('CMSMailer');
$cmsmailer->AddAddress('somemail@earth.com','tester');
$cmsmailer->SetBody('<h4>This is a test message</h4>');
$cmsmailer->IsHTML(true);
$cmsmailer->SetSubject('Test message');
$cmsmailer->Send();
But so far I had no luck fixing it.
Can any one help?