# PHP mailer problem... grrr

**URL:** <https://forum.kirupa.com/t/php-mailer-problem-grrr/165420>\
**Category:** Uncategorized\
**Created:** [October 11, 2005, 12:31am UTC](https://forum.kirupa.com/t/php-mailer-problem-grrr/165420 "2005-10-11T00:31:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![metatron](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@metatron](https://forum.kirupa.com/u/metatron)\
**Post date:** [October 11, 2005, 12:31am UTC](https://forum.kirupa.com/t/php-mailer-problem-grrr/165420/1 "2005-10-11T00:31:21Z")

</div>

So this is what’s going on:

I did a site for a small consulting company. As they wanted mail forms I chose HTML and PHP to do that. (I’m a very newbie in PHP).

When I finished the site I uploaded it into my server ([http://adolfo.losdelacatarina.com/egi](http://adolfo.losdelacatarina.com/egi)) and made tests and the forms DID send the mail.

I gave them a CD with the site so they can upload it to their hosting sevice… The mailer forms don’t work anymore. They don’t send the mail. My client and I had a little chat and their hosting service company told them some things that can cause the problem:

- Their server SMTP needs authentication.
- The site server is physically different than the mail server
- They gave me the server name ([mail.consultoresegi.com](http://mail.consultoresegi.com))

This is the PHP code:

```php
 
<?php 
if(isset($_POST['submit'])) { 
$to = "info@consultoresegi.com"; 
$subject = "Contacto"; 
$headers = 'From: info@consultoresegi.com';
$name_field = $_POST['name'];
$empresa_field = $_POST['empresa'];
$telefono_field = $_POST['telefono'];  
$email_field = $_POST['email']; 
$message = $_POST['message'];  
$dropdown = $_POST['drop_down'];
}
  
$body = "De: $name_field
 Empresa: $empresa_field
 Teléfono: $telefono_field
 E-Mail: $email_field
 $check_msg Cómo se entero de EGI: $dropdown
 Comentarios:
 $message
"; 
  
if ((!$name_field) || (!$empresa_field) || (!$email_field) || (!$telefono_field) || (!$message) || (!$dropdown))
{ 
	echo "Algunos de los campos requeridos no fueron llenados.<a href='javascript:history.back()'>Regresar</a>";
} else { 
  
echo 'Gracias, su solicitud fue atendida. En breve nos comunicaremos con usted.<p>Puede cerrar la ventana.'; 
mail($to, $subject, $body, $headers); 
}
?> 

```

So I don’t know what to do… I’m blank… ☹
