Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

GmailPHP problem

Featured Replies

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.