Mail()不适用于2变量或更多[关闭]

I would like to Understanding why this script does not work.

$to = $email_utente;

$subject = "Crono - nuovo task inserito";

$headers = 'From: CRONO <email@email.com>' . "
";
$headers .= 'MIME-Version: 1.0' . "
";
$headers .= 'Content-type: text/html; charset=utf-8' . "
";

$message  = "Ciao <b>".$login_session."</b>,";
$message .= "hai inserito un nuovo task su Crono!";

$message .= "Ecco il riepilogo dei tuoi dati:";
$message .= "Task: ".$nome_task."";
$message .= "Cliente: ".$cliente."";
$message .= "Tipo: ".$tipo."";
$message .= "Data inserimento: ".$data_inizio_new.";
$message .= "Data fine(Prevista): ".$data_fine_new.";
$message .= "Note: ".$note."";


$message .= "Grazie per aver utilizzato Crono.";


mail($to,$subject,$message,$headers);

if I comment all the different variables except one, the mail arrives properly. If, however, I remove the comment from the code, the email does not arrive.

Why is this happening?

thanks in advance

You appear to be missing some double quotes at the ends of these lines:

$message .= "Data inserimento: ".$data_inizio_new.";
$message .= "Data fine(Prevista): ".$data_fine_new.";

Change

$message .= "Data inserimento: ".$data_inizio_new.";
$message .= "Data fine(Prevista): ".$data_fine_new.";

to

$message .= "Data inserimento: ".$data_inizio_new;
$message .= "Data fine(Prevista): ".$data_fine_new;

or

$message .= "Data inserimento: ".$data_inizio_new."";
$message .= "Data fine(Prevista): ".$data_fine_new."";

every double quote(or single quote) should be matched with another double quote(or single quote).