There is a mistake in your header, every line must end with \r\n
and the last line of header will contain \r\n
and is sendMailRegisterToUser function under any class? because I am confused about mysql_connection. make sure your mysql is connected.
add a small verification
if($db_query==false)
{
echo mysql_error(); }
Why are you using this?
$userid = @$_SESSION['front_user_id'];
this has a basic mistake, what if $_SESSION['front_user_id'] is invalid?
use mysql_fetch_assoc instead mysql_fetch_array