Results 1 to 8 of 8

Thread: PHP Learning

  1. #1

    Thread Starter
    Member filburt1's Avatar
    Join Date
    Aug 1999
    Posts
    6,935

    PHP Learning

    I've got this code:
    PHP Code:
    <?php

    /* recipients */
    $to  "Arien Talabac <[email protected]>" ", " //note the comma

    /* subject */
    $subject "Test Mail";

    /* message */
    $message '
    Test message
    '
    ;

    /* To send HTML mail, set the Content-type header. */
    //$headers  = "MIME-Version: 1.0\n";
    //$headers  = "Content-type: text/html; charset=iso-8859-1\n";

    /* additional headers */
    $headers  "From: TurtleTips Auto-Mailer <[email protected]>\n";

    /* and now mail it */
    mail($to$subject$message$headers);

    ?>
    But I get an error on the last line (mail($to...):
    PHP Code:
    WarningServer Error in d:\apacheroot\phppages\sendmail.php on line 22 
    I defined my SMTP server in the php.ini file to be mail.*****.**.home.com (replacing the *s ) but it still doesn't work, and I can't find any error log to see what error was generated.

  2. #2
    Addicted Member
    Join Date
    Nov 2001
    Location
    Yewston, Texis
    Posts
    240
    Where it says "//note the comma" Did you try ripping off the comma? The comma means you're going to send it to another recipient as well.

    cudabean

  3. #3

    Thread Starter
    Member filburt1's Avatar
    Join Date
    Aug 1999
    Posts
    6,935
    No change. How can I find out more details about the error?

  4. #4
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    did you get rid of the dot as well, like

    PHP Code:
    $to  "Arien Talabac <[email protected]>"//note the comma 
    since that is the string concatenation char.

  5. #5

    Thread Starter
    Member filburt1's Avatar
    Join Date
    Aug 1999
    Posts
    6,935
    Yeah, but I still get that one error (well, warning). Does the PHP module have log files so I can see what "server error" occurred?

  6. #6
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923
    it must be some sort of config problem because PHP's compile errors are a lot more useful than that.

    Anyway, check this for error log stuff

    http://www.php.net/manual/en/ref.errorfunc.php

    theres also a link by some guy for a handler class.

  7. #7
    scoutt
    Guest
    are you using Apache or IIS?

    I also think you can't do this

    $to = "Arien Talabac <[email protected]>" . ", " ; //note the comma


    it needs to be this

    $to = "[email protected]";

    if you use apache it has it's own log file. check out what it says..

  8. #8

    Thread Starter
    Member filburt1's Avatar
    Join Date
    Aug 1999
    Posts
    6,935
    I'm using Apache, but there was nothing but 404s and Access Denied errors in the log file.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width