$values = $hook->getValues();

// User Email
$message = $modx->getChunk($hook->getValue('register.user')->isMember('LVPGuestPass') ? 'email-userGuestPass' : 'email-userNoGuestPass', $values);
$modx->getService('mail', 'mail.modPHPMailer');
$modx->mail->set(modMail::MAIL_BODY, $message);
$modx->mail->set(modMail::MAIL_FROM, 'info@luxusgroup.com');
$modx->mail->set(modMail::MAIL_FROM_NAME, 'Luxus Vacation Properties');
$modx->mail->set(modMail::MAIL_SENDER, 'Luxus Vacation Properties');
$modx->mail->set(modMail::MAIL_SUBJECT, 'Luxus Guest Pass');
$modx->mail->address('to', $values['email']);
$modx->mail->setHTML(TRUE);

if ( ! $modx->mail->send()) {
	$modx->log(modX::LOG_LEVEL_ERROR, 'An error occurred while trying to send the user register email: ' . $err);
}
$modx->mail->reset();

// Admin Email
$message = $modx->getChunk('email-adminGuestPass', $values);

$modx->getService('mail', 'mail.modPHPMailer');
$modx->mail->set(modMail::MAIL_BODY, $message);
$modx->mail->set(modMail::MAIL_FROM, 'modx@marketing.luxusgroup.com');
$modx->mail->set(modMail::MAIL_FROM_NAME, 'Luxus MODX');
$modx->mail->set(modMail::MAIL_SENDER, 'Luxus MODX');
$modx->mail->set(modMail::MAIL_SUBJECT, 'New LVP User Registered');
$modx->mail->address('to', 'info@luxusgroup.com');
$modx->mail->setHTML(TRUE);

if ( ! $modx->mail->send()) {
	$modx->log(modX::LOG_LEVEL_ERROR, 'An error occurred while trying to send the admin register email: ' . $err);
}
$modx->mail->reset();


// All Done
return TRUE;