"unknown date" via mail()

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Akhenaten

    "unknown date" via mail()

    Probably something simple but all email I send via mail() is received
    with an "unknown date" stamp. Am I missing something in my header?
    Code as follows:

    *************** **************
    <?php
    $headers = <<<END
    From: this@email.com
    Date: $date
    X-Mailer: PHP v$phpversion
    MIME-Version: 1.0
    Content-Type: multipart/related; boundary="$boun dary"
    END;

    $date = date("D M j G:i:s T Y");
    $Email = 'me@myemail.net ';
    $subject = 'Test Email';
    $message = 'test message';
    mail($Email,$su bject,$message, $headers);
    *************** *************** **

  • Schraalhans Keukenmeester

    #2
    Re: &quot;unknow n date&quot; via mail()

    At Tue, 22 May 2007 10:24:25 -0700, Akhenaten let his monkeys type:
    Probably something simple but all email I send via mail() is received
    with an "unknown date" stamp. Am I missing something in my header?
    Code as follows:
    >
    *************** **************
    <?php
    $headers = <<<END
    From: this@email.com
    Date: $date
    X-Mailer: PHP v$phpversion
    MIME-Version: 1.0
    Content-Type: multipart/related; boundary="$boun dary"
    END;
    >
    $date = date("D M j G:i:s T Y");
    $Email = 'me@myemail.net ';
    $subject = 'Test Email';
    $message = 'test message';
    mail($Email,$su bject,$message, $headers);
    *************** *************** **
    Set $date before you create the $headers. $date is empty in your example.
    Sh.

    Comment

    Working...