PHP mail() function send two email, one is empty

Discussion in 'PHP' started by reza56, Jun 24, 2007.

  1. #1
    I send email in my program by mail() function. this is the code :
    
    		$to = base64_decode($contactemail);
    		$msg = "<html><head><title>Guestbook Message</title><style> body { font-family: tahoma; font-size: 70%; line-height: 150% } </style></head><body>" . $_POST['message'] . "</body></html>";
    		$headers  = "MIME-Version: 1.0\r\n";
    		$headers .= "Content-type: text/html; charset=utf-8\r\n";
    		$headers .= "From: Site <" . $to . ">\r\n";
    		@mail($to, "Complaint Message", $msg, $headers);
    
    
    PHP:
    this code works nice but after each email another email is sent. that email is empty at all. Do you know how this email send?
     
    reza56, Jun 24, 2007 IP
  2. priyakochin

    priyakochin Banned

    Messages:
    4,740
    Likes Received:
    138
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Can you please put the whole code ?
    I can't find any error in this code !

    The problem can be due to the refresh of this code !
    Please do check this using " isset() " !
     
    priyakochin, Jun 24, 2007 IP