Is there any reason why the following script would not send an email? $to = "darkcard2000@aol.com" ; $subject = "Order" ; $message = "$name has placed an order with us. Here is the clients contact information:<br> <br> Name: $name <br> Email: $email <br> Phone Number: $phone <br><br> They have decided that the computer they want will be: $premade . <br> Further Specifications Include: <br><br> Primary Use: $use <br> CPU Speed: $cpu <br> CPU Cores: $cores <br> RAM Amount: $ram <br> RAM Speed: $ramspeed <br> Graphics Chipset: $gpc <br> Graphics Speed $gps <br> Graphics Memory: $gmp <br> SLI: $sli <br> Hard Disk Size: $hdd <br> CD/DVD Drive: $cddvd <br> Blu-Ray Drive: $bluray <br> SD Card Reader: $sd <br> Cooling Type: $cooling <br> Specific Requests: <br> $requests <br><br> Please forward this email to the following people: Robert Braun, and Nick Siebenlist. Nick, create and price out an estimate fitting, as much as possible, the customers request. Then forward the excel sheet to Robert and Chris. Robert, make a log of the clients contact information and its current status. Send the clients information in an excel sheet to Nick and Chris. Chris, store all user and order information accordingly on the server." ; $from = "From $email" ; mail( $to,$subject,$message,$from ); PHP: I have tried replacing the <br>'s with \n's but I still do not get an email. No error occurs. and $email is specified.
There needs to be a : after From. $headers = 'From: webmaster@example.com' . "\r\n" . 'Reply-To: webmaster@example.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); PHP:
Correct the code this way: $to = "darkcard2000@aol.com" ; $subject = "Order" ; $headers = "From:yourname@your-website-name.com\r\n" ; $headers .= "Reply-To:$email\r\n" ; mail( $to,$subject,$message,$headers ); PHP: For details, see: Why is my PHP script not sending emails?