/** * @param User $user * @param $betreff * @param string $activationLink * @param string $template * @return bool|string */ public static function activate(User $user, $betreff, $activationLink = '', $template = '') { if ($user->us_email == '') { return false; } if ($template == '') { $template = __DIR__ . '/Mails/UserActivate.template.html'; } if ($activationLink == '') { // TODO: Default-Link generieren } // Mail senden $temp = new ControlContainer(null, ''); $temp->setSkinfile($template); $temp->setEntity($user); $temp->setVar('activationLink', $activationLink); $nachrichttext = $temp->toHtml(); $empfaenger = $user->us_email; return Mailer::getInstance()->sendMail($empfaenger, $betreff, $nachrichttext, $nachrichttext); }