0

<?php
if(isset($_POST['email'])){
        $subject = "mail from web";
        $body = "New message from web
<br><br>
FROM: ".$_POST['email']."<br>
NAME: ".$_POST['author']."<br>
COMMENTS: ".$_POST['message']."<br>";
  $headers = "To: nixon <*****@*****.***>\r\n";
        $headers .= "From: ".$_POST['author']." <".$_POST['email'].">\r\n";
        $headers .= "Content-Type: text/html";
        //envio destinatario
        $mail_success =  mail($mailTo, utf8_decode($subject), utf8_decode($body), $headers);
}

?>

it is from a html template it says message send but not even comunicating with smtp server according to hmail log

Vag Mor
  • 21
  • 2
  • Why is business logic codeed inside an "html template"? And why do you claim it "says" that a message has been send? Can't see that in the code... Also, how the `mail` function tries to send a message depends on the configuration, which you did not post. Why do you think it should contact `hmail` (which is some MS-Windows based smtp server AFAIK)? – arkascha Jun 13 '15 at 17:40
  • i though so to and itry to add $mailto=" ***@*****.*** " but nothing changed same behavior – Vag Mor Jun 13 '15 at 17:43
  • this is php mail function called by a html code.. this is for sure good and the message send succesfully is returned by the code i assume – Vag Mor Jun 13 '15 at 17:46
  • You "assume"? What does that mean? Returned to where? – arkascha Jun 13 '15 at 17:47
  • And why those utf decoding calls? This gets more and more spookey :-) – arkascha Jun 13 '15 at 17:49
  • @MattyF There is little sense in considering what the OP might understand or not. He is to ask, if there is some detail unclear. And I see little way of improving something which I don't understand. That is why I ask. To understand. – arkascha Jun 13 '15 at 17:55

0 Answers0