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
    Posts
    5

    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]@gmail.com>\n";
                    
    $headers .= "Reply-to: <[I]***myemail***[/I]@gmail.com>"."\n";
                    
    $headers .= "Content-Type: text/html; charset=windows-1252\n";
                    
    $headers .= "Content-Transfer-Encoding: 7bit\n";
                    
    $headers .= "From: <[I]***myemail***[/I]@gmail.com>\n";
                    
    $headers .= "X-Priority: 3\n";
                    
    $headers .= "MIME-Version: 1.0\n";
                    
    $headers .= "Organization: SWAMI Website\r\n"
                    
    $headers .= "\n\n";
        
    $to 'riojas15@gmail.com';
        
    $subject $name "'s CFA Bowl Entry";
        
    $contents $picks "\t" $person;
        
       if(
    mail($to$subject$contents$headers)) {
            echo(
    "<p>Message successfully sent!</p>");
        } else {
            echo(
    "<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
    Posts
    573

    Default

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

Posting Permissions

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

SEO by vBSEO