I'm trying to send an email to validate a user's registration, this is my code.
$id = mysql_insert_id($connect);
// Criar as variaveis para validar o email
$url =sprintf( 'id=%s&email=%s&uid=%s&key=%s',$id, md5($email),
md5($uid),md5($data_ts));
$mensagem = 'Para confirmar seu cadastro acesse o link:'."\n";
$mensagem .= sprintf('http://www.gomap.eco.br/ativar.php?%s',$url);
$headers = "From:".$from;
mail($to,$subject,$mensagem,$headers);
But when I put this part the email is not sent: $ id = mysql_insert_id ($ connect);
What should I do?