-1

The pages are the following: - http://www.coresdaventura.com/free-quote.php - http://www.coresdaventura.pt/orcamentos-gratis.php

This is the same code for both pages:

$header = "Mime-version:1.0\n";
$header .= "Content-type: text/html;charset=iso-8859-1\n";
$header .= "From: " . $_POST['email'] . "<" . $_POST['email'] . ">\r\n";

$content = "<html>
            <style>
              //some style
            </style>
            <body>
              //some content
            </body>
            </html>";

$email = "example@coresdaventura.pt";

mail($email, utf8_encode("Subject example"), $content, $header);

Sometimes clients contact us saying that they have sent us some emails thought the website but we haven't received (not in the spam folder as well). Any thoughts why?

Note: We are using gmail platform for our company's email (https://www.gmail.com/intl/en_us/mail/help/work.html)

expertCode
  • 533
  • 4
  • 14

1 Answers1

-1

You are NOT using Gmail platform - you are PRETENDING to use it (at least that's how other servers see it).

If you want to make it work, use PHP SMTP library, which allows you to authenticate with your google username and password, plus their SMTP server, thus using their platform for real.

mariobgr
  • 2,143
  • 2
  • 16
  • 31
  • I am not saying that we want to use the Gmail Platform... I just referred that point because it could have some impact on why this is happening. You maybe misunderstood that sentence because I used the word "using". I know that is another server that receives it and gmail replicates. – expertCode Apr 18 '15 at 09:03
  • Well, anyway, using php mail() function is not very useful if you really want to send the email so that anyone can receive it. Doesn't matter if that's you or the client. – mariobgr Apr 18 '15 at 09:06
  • But if you don't want to change your code, just add an exception in the spam rules of your gmail account for this specific domain. Should work.. but just for you. Any other inbox would treat is as spam. – mariobgr Apr 18 '15 at 09:07
  • We are not receiving on spam folder as well. It is in nowhere... – expertCode Apr 18 '15 at 09:12