• Hi all,

    I know that errors of this sort usually involve spaces around the php tags, but I cannot find any. I had this problem with my functions file and ended up having to delete the file completely. I’m now having issues with my mail.php email form file. Here is the error:

    Warning: Cannot modify header information – headers already sent by (output started at /home/lxproper/www/test/wp-content/themes/lxproperties/mail.php:1) in /home/lxproper/www/test/wp-content/themes/lxproperties/mail.php on line 13

    And here is my code:

    <?php
    $question = $_POST['question'];
    $formcontent="Question: $question \n";
    $recipient = "[email protected]";
    $subject = "Title of Email";
    $mailheader = "From: $email \r\n";
    mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
    header('Location: index.php');
    ?>

    As you can see, there are no spaces surrounding the php tags. There weren’t any spaces in my functions file either, but I received a similar error. I checked wp-config.php and saw no spaces there, as well.

    Can anyone shed some insight? Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Warning: Cannot modify header information’ is closed to new replies.