Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2004

    PHP Mail Problem

    I develop PHP regularly, but for some reason I can't figure this out... is it my host, or am I missing something stupid???

    Here's my PHP form:

    $Name = stripslashes($name);
    $Email = stripslashes($email);
    $Subject = stripslashes($subject);
    $Bext = stripslashes($text);
    mail([email protected]',$Subject,$Body,"From: $Name <$Email>");

    And when my HTML form posts to it, here's what comes up:


    Probably something simple... Any help would be greatly appreciated.


  2. #2
    Join Date
    Jun 2004
    Bay Area -USA

    Re: PHP Mail Problem

    PHP Code:
    $Name stripslashes($name);
    $Email stripslashes($email);
    $Subject stripslashes($subject);
    $Bext stripslashes($text);
    $Body $_POST['Body'];
    mail("[email protected]",$Subject,$Body,"From: $Name <$Email>");
    header("Location: index.html");
    I dont know if this is it or not but in the first part of the mail you had ' ' around the email and " " around the From: part.

    Also, you may want to check what your body is by printing it "print($Body);" to see

    Maybe try adding $body = $_POST.. manually (i did it above).

    Hope that helps a little.
    <<< Please see Forum Guidelines for signature setup. >>>

  3. #3
    at first glance, this could be text encoding problem. the strange characters you got (chinese), can only be printed with utf-8 encoding. maybe you can check the original email (by enabling full headers) to see whether this assumption is correct or not.
    everyday is deadline

  4. #4
    Join Date
    Apr 2004
    Made the change listed above, and now I can get a blank page, but still no e-mail... Maybe I'll just use a premade script - I think I'm missing something simple here.


Posting Permissions

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