May 18, 201214 yr Hello, I have a client who wanted me to manage their website, it had been created by somebody else. I have since been told by the client that he isn't receiving his emails to his Gmail account from the contact form. Has anybody got any idea why this isn't getting to his email? It works on other none gmail emails. Here is the code... ======= <?php session_start(); if($_SESSION['security_code'] != $_POST['security_code']){ //incorrect code unset($_SESSION['security_code']); $loc = "quotationsagain.php"; header("Location: ". $loc); }else{ $goemail = $_POST["goemail"]; if (!$goemail){ exit; } else { $recipientemail = "creativewebsiteproblems@gmail.com"; $returnURL = "quotations_success.php"; ############## You don't have to change anything below this line ############## $subject = "Quotations Form Received"; $name = strip_tags(trim(addslashes($_POST["name"]))); $email = strip_tags(trim(addslashes($_POST["email"]))); $company = strip_tags(trim(stripslashes($_POST["company"]))); $telephone = strip_tags(trim(addslashes($_POST["telephone"]))); $address = strip_tags(trim(addslashes($_POST["address"]))); $calendar = strip_tags(trim(addslashes($_POST["calendar"]))); $quantity = strip_tags(trim(addslashes($_POST["quantity"]))); $colours = strip_tags(trim(addslashes($_POST["colours"]))); $comments = strip_tags(trim(addslashes($_POST["comments"]))); $datetime = date("D, dS F, Y @ H:i:s T"); $headers = "MIME-Version: 1.0" . "\r\n"; $headers .= 'From: "'.$from.'" <'.$replyemail.' >' . "\r\n"; $headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n"; $msgbody =' <style type="text/css"> <!-- .style1 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; } --> </style> <table border=0 cellspacing=0 cellpadding=5 width="100%" class="style1"> <tr> <td colspan="2" >You have received contact from your website.</td> </tr> <tr> <td colspan="2" > </td> </tr> <tr> <td><b>Name:</b></td><td>'.$name.'</td> </tr> <tr> <td><b>Email:</b></td><td>'.$email.'</td> </tr> <tr> <td><b>Telephone Number:</b></td><td>'.$telephone.'</td> </tr> <tr> <td><b>Fax:</b></td><td>'.$fax.'</td> </tr> <tr> <td><b>Address:</b></td><td>'.$address.'</td> </tr> <tr> <td><b>Calendar:</b></td><td>'.$calendar.'</td> </tr> <tr> <td><b>Quantity:</b></td><td>'.$quantity.'</td> </tr> <tr> <td><b>Colours:</b></td><td>'.$colours.'</td> </tr> <tr> <td><b>Comments:</b></td><td>'.$comments.'</td> </tr> </table> '; $message = $msgbody; $message = str_replace('\n', "<br>" ,$message); $message = str_replace("#messagedate#",$datetime, $message); $success = mail($recipientemail, $subject, $message, $headers, "-f".$recipientemail); if ($success){ header("location: ".$returnURL); } } } ?> ======== Many thanks Jonathan
Create an account or sign in to comment