Sending PHP Form

0

I'm having a problem submitting my site's form via PHP. I even followed the example of my hosting, Locaweb, but the submission is not done. Can anyone help me?

<?php

$quebra_linha = "\n";
$emailsender = "[email protected]";
$nomeremetente = "Fabrica da Limpeza";
$emaildestinatario = "[email protected]";
$assunto = "Contato via Site";
$mensagem = "blabla";

$mensagemHTML = 'teste'.$mensagem.'';

$headers = "MIME-Version: 1.1".$quebra_linha;
$headers .= "Content-type: text/html; charset=iso-8859-1".$quebra_linha;
$headers .= "From: ".$emailsender.$quebra_linha;
$headers .= "Return-Patch: ".$emailsender.$quebra_linha;
$headers .= "Reply-To: ".$emailsender.$quebra_linha;

mail ($emaildestinatario, $assunto, $mensagemHTML, $headers , "-r". $emailsender);

?>
    
asked by anonymous 29.04.2016 / 16:08

1 answer

0

As your "variables" are constant, I recommend that you put the direct name in the body of the message and not in other variables. Example:

$headers .= "From:[email protected]" . \r \n; 

Instead of:

$headers .= "From: ".$emailsender.$quebra_linha;

I do not know if this is it, but it can be ... If it is a server configuration error, try to force an error or contact your server services.

    
29.04.2016 / 16:28