function notifyNewUser($address, $username)
{
    global $AppUI;
    $mail = new w2p_Utilities_Mail();
    if ($mail->ValidEmail($address)) {
        if ($mail->ValidEmail($AppUI->user_email)) {
            $email = $AppUI->user_email;
        } else {
            return false;
        }
        $mail->To($address);
        $emailManager = new w2p_Output_EmailManager();
        $body = $emailManager->getNotifyNewUser($username);
        $mail->Subject('New Account Created');
        $mail->Body($body);
        $mail->Send();
    }
}
Esempio n. 2
0
function notifyNewUser($emailAddress, $username, $emailUtility = null)
{
    global $AppUI;
    $emailManager = new w2p_Output_EmailManager($AppUI);
    $body = $emailManager->getNotifyNewUser($username);
    $mail = !is_null($emailUtility) ? $emailUtility : new w2p_Utilities_Mail();
    $mail->To($emailAddress);
    $mail->Subject('New Account Created');
    $mail->Body($body);
    return $mail->Send();
}