php contact form "Have been some problems sending the email."
<p>I am a nebie to php. I am using a pre build html template. Where I had to configure the form mentioned below. I have changed two values:</p>

<pre><code>$emailAdmin = "myemailid@gmail.com",
$urlWebSite = "mydomain.co.cc"
</code></pre>

<p>but when I click on send email. It give an error message "Have been some problems sending the email."</p>

<pre><code>&lt;?php
// ------------------------------------------------ -----------------------------------
// CONFIGURATION PARAMETERS OF GENERAL
// ------------------------------------------------ -----------------------------------
$emailAdmin = "myemailid@gmail.com", // email admin where notices are sent
$urlWebSite = "mydomain.co.cc" // Website URL That Is added to the bottom of emails sent from contact form

$headers_mail = "From: Company Name &lt;info@your_domain.com&gt; \ nReply-to: info@your_domain.com";
define ("OGGETTO_MAIL", "Contact from the site.");

$str_contenuto_email = "
You are receiving this email Because someone used the card of contacts on your website.

Here the personal information we have That Contacted:

-------------------------------------------------- -----------
Name and Surname: {name}
E-mail: mail {}
IP Address: {ip}
-------------------------------------------------- -----------

This is the user's request:

-------------------------------------------------- -----------
Message: {body}
-------------------------------------------------- -----------

{url} ";
?&gt;
</code></pre>

<p>I forgot to mention one more php file which I haven't configured it but its there by default in the include folder:</p>

<pre><code>&lt;?php
include_once("config.php");
//------------------------------------------------------------------------------------------------
// RECUPERO IL VALORE DI TUTTI I DATI INVIATI DALL'UTENTE
//------------------------------------------------------------------------------------------------
$str_ind_ip = $_SERVER['REMOTE_ADDR'];
foreach ($_POST as $key=&gt;$value) {
    $$key = $value;
}
//------------------------------------------------------------------------------------------------
//  PROCEDURA DI INVIO MAIL
//-------------------------------------
$str_oggetto            = OGGETTO_MAIL;
$str_contenuto_email    = str_replace("{name}",$visitor,$str_contenuto_email);
$str_contenuto_email    = str_replace("{mail}",$visitormail,$str_contenuto_email);
$str_contenuto_email    = str_replace("{ip}", $str_ind_ip,$str_contenuto_email);
$str_contenuto_email    = str_replace("{corpo}",$notes,$str_contenuto_email);
$str_contenuto_email    = str_replace("{url}",$urlWebSite,$str_contenuto_email);
$headers                = $headers_mail;

if (!@mail($emailAdmin,$str_oggetto,$str_contenuto_email,$headers)) {
    echo "&lt;div class=\"error\"&gt;Have been some problems sending the email.&lt;/div&gt;";
} else {
    echo "&lt;div class=\"success\"&gt;The email has been sent successfully.&lt;/div&gt;";
}
</code></pre>
