Results 1 to 2 of 2

Thread: PHP mail() does not work for me

  1. #1
    riojas15 is offline Junior Member
    Join Date
    Sep 2015

    Default PHP mail() does not work for me

    To the master gurus at AlterVista,
    I am fairly new to web programming, but I've been working on a college fooball pool website where a group of my friends submit our predictions and see who is the best "SWAMI".
    I've tried the following code, but CANNOT get any emails. Can you please check the php settings or any other configurations to see what I am doing wrong? Thaks.

    PHP Code:
      $headers "Return-path: <[I]***myemail***[/I]>\n";
    $headers .= "Reply-to: <[I]***myemail***[/I]>"."\n";
    $headers .= "Content-Type: text/html; charset=windows-1252\n";
    $headers .= "Content-Transfer-Encoding: 7bit\n";
    $headers .= "From: <[I]***myemail***[/I]>\n";
    $headers .= "X-Priority: 3\n";
    $headers .= "MIME-Version: 1.0\n";
    $headers .= "Organization: SWAMI Website\r\n"
    $headers .= "\n\n";
    $to '';
    $subject $name "'s CFA Bowl Entry";
    $contents $picks "\t" $person;
    mail($to$subject$contents$headers)) {
    "<p>Message successfully sent!</p>");
        } else {
    "<p>Message delivery failed...</p>");
    Last edited by karl94; 12-13-2015 at 11:43 PM. Reason: Formatting

  2. #2
    karl94 is offline AlterVista Staff
    Join Date
    Jan 2015


    Try to remove the Return-path and Reply-to headers, and use in the From header the value <>.

Posting Permissions

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